This commit is contained in:
@@ -68,12 +68,22 @@ class WalletPersistenceTest (BitcoinTestFramework):
|
||||
|
||||
# Verify shielded balance
|
||||
assert_equal(self.nodes[0].z_getbalance(sapling_addr), Decimal('20'))
|
||||
|
||||
|
||||
# Verify size of shielded pools
|
||||
pools = self.nodes[0].getblockchaininfo()['valuePools']
|
||||
assert_equal(pools[0]['chainValue'], Decimal('0')) # Sprout
|
||||
assert_equal(pools[1]['chainValue'], Decimal('20')) # Sapling
|
||||
|
||||
# Restart the nodes
|
||||
stop_nodes(self.nodes)
|
||||
wait_bitcoinds()
|
||||
self.setup_network()
|
||||
|
||||
# Verify size of shielded pools
|
||||
pools = self.nodes[0].getblockchaininfo()['valuePools']
|
||||
assert_equal(pools[0]['chainValue'], Decimal('0')) # Sprout
|
||||
assert_equal(pools[1]['chainValue'], Decimal('20')) # Sapling
|
||||
|
||||
# Node 0 sends some shielded funds to Node 1
|
||||
dest_addr = self.nodes[1].z_getnewaddress('sapling')
|
||||
recipients = []
|
||||
@@ -128,4 +138,4 @@ class WalletPersistenceTest (BitcoinTestFramework):
|
||||
assert_equal(self.nodes[1].z_getbalance(dest_addr), Decimal('16'))
|
||||
|
||||
if __name__ == '__main__':
|
||||
WalletPersistenceTest().main()
|
||||
WalletPersistenceTest().main()
|
||||
|
||||
@@ -670,7 +670,8 @@ bool CBlockTreeDB::LoadBlockIndexGuts()
|
||||
pindexNew->nCachedBranchId = diskindex.nCachedBranchId;
|
||||
pindexNew->nTx = diskindex.nTx;
|
||||
pindexNew->nSproutValue = diskindex.nSproutValue;
|
||||
|
||||
pindexNew->nSaplingValue = diskindex.nSaplingValue;
|
||||
|
||||
// Consistency checks
|
||||
auto header = pindexNew->GetBlockHeader();
|
||||
if (header.GetHash() != pindexNew->GetBlockHash())
|
||||
|
||||
Reference in New Issue
Block a user