mirror of
https://github.com/QuasarApp/QuasarAppCoin.git
synced 2025-05-07 06:59:37 +00:00
Merge remote-tracking branch 'bitcoin/master'
This commit is contained in:
commit
69f61ec222
1224
doc/release-notes/release-notes-0.18.0.md
Normal file
1224
doc/release-notes/release-notes-0.18.0.md
Normal file
File diff suppressed because it is too large
Load Diff
@ -337,7 +337,9 @@ std::string PSBTRoleName(PSBTRole role) {
|
|||||||
case PSBTRole::SIGNER: return "signer";
|
case PSBTRole::SIGNER: return "signer";
|
||||||
case PSBTRole::FINALIZER: return "finalizer";
|
case PSBTRole::FINALIZER: return "finalizer";
|
||||||
case PSBTRole::EXTRACTOR: return "extractor";
|
case PSBTRole::EXTRACTOR: return "extractor";
|
||||||
|
// no default case, so the compiler can warn about missing cases
|
||||||
}
|
}
|
||||||
|
assert(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DecodeBase64PSBT(PartiallySignedTransaction& psbt, const std::string& base64_tx, std::string& error)
|
bool DecodeBase64PSBT(PartiallySignedTransaction& psbt, const std::string& base64_tx, std::string& error)
|
||||||
|
@ -1085,11 +1085,12 @@ void AllocateFileRange(FILE *file, unsigned int offset, unsigned int length) {
|
|||||||
fcntl(fileno(file), F_PREALLOCATE, &fst);
|
fcntl(fileno(file), F_PREALLOCATE, &fst);
|
||||||
}
|
}
|
||||||
ftruncate(fileno(file), fst.fst_length);
|
ftruncate(fileno(file), fst.fst_length);
|
||||||
#elif defined(__linux__)
|
#else
|
||||||
|
#if defined(__linux__)
|
||||||
// Version using posix_fallocate
|
// Version using posix_fallocate
|
||||||
off_t nEndPos = (off_t)offset + length;
|
off_t nEndPos = (off_t)offset + length;
|
||||||
posix_fallocate(fileno(file), 0, nEndPos);
|
if (0 == posix_fallocate(fileno(file), 0, nEndPos)) return;
|
||||||
#else
|
#endif
|
||||||
// Fallback version
|
// Fallback version
|
||||||
// TODO: just write one byte per block
|
// TODO: just write one byte per block
|
||||||
static const char buf[65536] = {};
|
static const char buf[65536] = {};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user