Merge pull request #6513 from nuttycom/fix_build
Fix current build errors
This commit is contained in:
commit
33d9ff3d24
|
@ -40,10 +40,10 @@ Options:
|
||||||
-allowdeprecated=<feature>
|
-allowdeprecated=<feature>
|
||||||
Explicitly allow the use of the specified deprecated feature. Multiple
|
Explicitly allow the use of the specified deprecated feature. Multiple
|
||||||
instances of this parameter are permitted; values for <feature> must be
|
instances of this parameter are permitted; values for <feature> must be
|
||||||
selected from among {"none", "gbt_oldhashes", "addrtype",
|
selected from among {"none", "deprecationinfo_deprecationheight",
|
||||||
|
"gbt_oldhashes", "z_getbalance", "z_gettotalbalance", "addrtype",
|
||||||
"getnewaddress", "getrawchangeaddress", "legacy_privacy",
|
"getnewaddress", "getrawchangeaddress", "legacy_privacy",
|
||||||
"wallettxvjoinsplit", "z_getbalance", "z_getnewaddress",
|
"wallettxvjoinsplit", "z_getnewaddress", "z_listaddresses"}
|
||||||
"z_gettotalbalance", "z_listaddresses"}
|
|
||||||
|
|
||||||
-blocknotify=<cmd>
|
-blocknotify=<cmd>
|
||||||
Execute command when the best block changes (%s in cmd is replaced by
|
Execute command when the best block changes (%s in cmd is replaced by
|
||||||
|
|
|
@ -79,23 +79,7 @@ class UpgradeGoldenTest(BitcoinTestFramework):
|
||||||
regtest_path = self.options.tmpdir+"/node"+ str(i)+"/regtest"
|
regtest_path = self.options.tmpdir+"/node"+ str(i)+"/regtest"
|
||||||
shutil.rmtree(regtest_path)
|
shutil.rmtree(regtest_path)
|
||||||
with tarfile.open(upgrade.tgz_path, "r:gz") as tgz:
|
with tarfile.open(upgrade.tgz_path, "r:gz") as tgz:
|
||||||
def is_within_directory(directory, target):
|
tgz.extractall(path = regtest_path)
|
||||||
abs_directory = os.path.realpath(directory, strict=True)
|
|
||||||
abs_target = os.path.realpath(target, strict=True)
|
|
||||||
|
|
||||||
prefix = os.path.commonprefix([abs_directory, abs_target])
|
|
||||||
|
|
||||||
return prefix == abs_directory
|
|
||||||
|
|
||||||
def safe_extract(tar, path):
|
|
||||||
for member in tar.getmembers():
|
|
||||||
member_path = os.path.join(path, member.name)
|
|
||||||
if not is_within_directory(path, member_path):
|
|
||||||
raise Exception("Attempted Path or Symlink Traversal in Tar File")
|
|
||||||
|
|
||||||
tar.extractall(path)
|
|
||||||
|
|
||||||
safe_extract(tgz, regtest_path)
|
|
||||||
|
|
||||||
# Upgrade each node to the latest network version. If any fails to
|
# Upgrade each node to the latest network version. If any fails to
|
||||||
# start, this will fail the test.
|
# start, this will fail the test.
|
||||||
|
|
|
@ -879,7 +879,7 @@ TEST(ChecktransactionTests, SaplingSproutInputSumsTooLarge) {
|
||||||
mtx.vJoinSplit.push_back(jsdesc);
|
mtx.vJoinSplit.push_back(jsdesc);
|
||||||
}
|
}
|
||||||
|
|
||||||
mtx.vShieldedSpend.push_back(SpendDescription());
|
mtx.vShieldedSpend.push_back(RandomInvalidSpendDescription());
|
||||||
|
|
||||||
mtx.vJoinSplit[0].vpub_new = (MAX_MONEY / 2) + 10;
|
mtx.vJoinSplit[0].vpub_new = (MAX_MONEY / 2) + 10;
|
||||||
|
|
||||||
|
|
|
@ -34,6 +34,7 @@
|
||||||
#include "zcash/Address.hpp"
|
#include "zcash/Address.hpp"
|
||||||
#include "zcash/address/zip32.h"
|
#include "zcash/address/zip32.h"
|
||||||
|
|
||||||
|
#include "util/test.h"
|
||||||
#include "util/time.h"
|
#include "util/time.h"
|
||||||
#include "asyncrpcoperation.h"
|
#include "asyncrpcoperation.h"
|
||||||
#include "asyncrpcqueue.h"
|
#include "asyncrpcqueue.h"
|
||||||
|
@ -4660,7 +4661,7 @@ size_t EstimateTxSize(
|
||||||
taddrRecipientCount += 1;
|
taddrRecipientCount += 1;
|
||||||
},
|
},
|
||||||
[&](const libzcash::SaplingPaymentAddress& addr) {
|
[&](const libzcash::SaplingPaymentAddress& addr) {
|
||||||
mtx.vShieldedOutput.push_back(OutputDescription());
|
mtx.vShieldedOutput.push_back(RandomInvalidOutputDescription());
|
||||||
},
|
},
|
||||||
[&](const libzcash::SproutPaymentAddress& addr) {
|
[&](const libzcash::SproutPaymentAddress& addr) {
|
||||||
JSDescription jsdesc;
|
JSDescription jsdesc;
|
||||||
|
@ -4671,7 +4672,7 @@ size_t EstimateTxSize(
|
||||||
if (addr.GetOrchardReceiver().has_value()) {
|
if (addr.GetOrchardReceiver().has_value()) {
|
||||||
orchardRecipientCount += 1;
|
orchardRecipientCount += 1;
|
||||||
} else if (addr.GetSaplingReceiver().has_value()) {
|
} else if (addr.GetSaplingReceiver().has_value()) {
|
||||||
mtx.vShieldedOutput.push_back(OutputDescription());
|
mtx.vShieldedOutput.push_back(RandomInvalidOutputDescription());
|
||||||
} else if (addr.GetP2PKHReceiver().has_value()
|
} else if (addr.GetP2PKHReceiver().has_value()
|
||||||
|| addr.GetP2SHReceiver().has_value()) {
|
|| addr.GetP2SHReceiver().has_value()) {
|
||||||
taddrRecipientCount += 1;
|
taddrRecipientCount += 1;
|
||||||
|
|
Loading…
Reference in New Issue