Fix rebase to 0.19.1
Signed-off-by: Anthony Fieroni <bvbfan@abv.bg>
This commit is contained in:
parent
d3f9a44e57
commit
1138fac5e1
9 changed files with 29 additions and 30 deletions
|
@ -5,6 +5,7 @@ define(_CLIENT_VERSION_MINOR, 19)
|
|||
define(_CLIENT_VERSION_REVISION, 0)
|
||||
define(_CLIENT_VERSION_BUILD, 0)
|
||||
define(_CLIENT_VERSION_RC, 1)
|
||||
define(_CLIENT_VERSION_IS_RELEASE, false)
|
||||
define(_COPYRIGHT_YEAR, 2019)
|
||||
define(_COPYRIGHT_HOLDERS,[The %s developers])
|
||||
define(_COPYRIGHT_HOLDERS_SUBSTITUTION,[[LBRYcrd Core]])
|
||||
|
|
|
@ -245,10 +245,6 @@ void Shutdown(InitInterfaces& interfaces)
|
|||
GetMainSignals().FlushBackgroundCallbacks();
|
||||
|
||||
// Stop and delete all indexes only after flushing background callbacks.
|
||||
if (g_txindex) {
|
||||
g_txindex->Stop();
|
||||
g_txindex.reset();
|
||||
}
|
||||
ForEachBlockFilterIndex([](BlockFilterIndex& index) { index.Stop(); });
|
||||
DestroyAllBlockFilterIndexes();
|
||||
|
||||
|
|
|
@ -1397,12 +1397,14 @@ bool CChainState::IsInitialBlockDownload() const
|
|||
return false;
|
||||
if (fImporting || fReindex)
|
||||
return true;
|
||||
if (Params().NetworkIDString() == CBaseChainParams::MAIN) {
|
||||
if (m_chain.Tip() == nullptr)
|
||||
return true;
|
||||
if (m_chain.Tip()->nChainWork < nMinimumChainWork)
|
||||
return true;
|
||||
if (m_chain.Tip()->GetBlockTime() < (GetTime() - nMaxTipAge) && Params().NetworkIDString() == CBaseChainParams::MAIN)
|
||||
if (m_chain.Tip()->GetBlockTime() < (GetTime() - nMaxTipAge))
|
||||
return true;
|
||||
}
|
||||
LogPrintf("Leaving InitialBlockDownload (latching to false)\n");
|
||||
m_cached_finished_ibd.store(true, std::memory_order_relaxed);
|
||||
return false;
|
||||
|
|
|
@ -102,8 +102,8 @@
|
|||
"00000020c0bab96390e8b6470f3e499d8242e6aa2e10d730c4bc5c08f0bed52cc6a581d3f2c617558f17c4624b418c93ee54db4b336de5893c1ae3ceb7f0ebbf3489717801000000000000000000000000000000000000000000000000000000000000002b4ae75affff7f20000000000102000000010000000000000000000000000000000000000000000000000000000000000000ffffffff0401630101ffffffff0200e1f505000000001976a9142b4569203694fc997e13f2c0a1383b9e16c77a0d88ac0000000000000000266a24aa21a9ede2f61c3f71d1defd3fa999dfa36953755c690689799962b48bebd836974e8cf900000000",
|
||||
"000000203862c5ba29ee33ff1f73a2ea99895a50765d16854e90c36cd9c4453f63223439dcf34e59511ec731270b3be77cde9cea36d687107869f7922caf34407cef448801000000000000000000000000000000000000000000000000000000000000002b4ae75affff7f20010000000102000000010000000000000000000000000000000000000000000000000000000000000000ffffffff0401640101ffffffff0200e1f505000000001976a9142b4569203694fc997e13f2c0a1383b9e16c77a0d88ac0000000000000000266a24aa21a9ede2f61c3f71d1defd3fa999dfa36953755c690689799962b48bebd836974e8cf900000000",
|
||||
"00000020c8d28e0e110b6091c131db734ce1e2f0fd0aaa229be7dff3d747ec840d9125a8fa9de6495f555abd1fc167ebbf0e74ec48dd62b62a6e63c5f190de905e0c2d0d01000000000000000000000000000000000000000000000000000000000000002b4ae75affff7f20000000000102000000010000000000000000000000000000000000000000000000000000000000000000ffffffff0401650101ffffffff0200e1f505000000001976a9142b4569203694fc997e13f2c0a1383b9e16c77a0d88ac0000000000000000266a24aa21a9ede2f61c3f71d1defd3fa999dfa36953755c690689799962b48bebd836974e8cf900000000",
|
||||
"00000020bb47178c6cc901e281828e1a526a57e91f9ef31ba6be4a21273f39606c1a2af120aa697bf8883367625d51f5a60c9c1e8c9b536c70760b1e08e997fbdb29ca1301000000000000000000000000000000000000000000000000000000000000002b4ae75affff7f20000000000202000000010000000000000000000000000000000000000000000000000000000000000000ffffffff0401660101ffffffff0294f2f505000000001976a9142b4569203694fc997e13f2c0a1383b9e16c77a0d88ac0000000000000000266a24aa21a9ed8ece331a4b209e55a4aac96f62d3a65161730bb22050e3b3c4c81c445dd405ba000000000200000001c0d11554e9f1894363c20014df861e1a47b3008cb972a2af2e927764c74e8a19000000006a47304402203ec815c13696de65ddf7dd857b7d2b873d6eafbe8768b96e82805a7d8770535f0220715adb27ea2020d7d1b4464a3ea1334235483033e752b3089d3dba27d70e842401210227d85ba011276cf25b51df6a188b75e604b38770a462b2d0e9fb2fc839ef5d3ffeffffff026c1b3101000000001976a9142b4569203694fc997e13f2c0a1383b9e16c77a0d88ac00b4c404000000001976a914cfd79f22909a1a880ed747b4d9b98da64640f7fa88ac65000000",
|
||||
"00000020693ac00f325911a075c491d2dd222d9dcab186ade6eec2a48d7af45b957edfac77b93cbe37a52ea6f59dc5b5507246188468637b412c394756fcf4be1518d99e01000000000000000000000000000000000000000000000000000000000000002b4ae75affff7f20000000000402000000010000000000000000000000000000000000000000000000000000000000000000ffffffff0401670101ffffffff02a208f605000000001976a9142b4569203694fc997e13f2c0a1383b9e16c77a0d88ac0000000000000000266a24aa21a9edb07989b9f723767af2ecb5d1535554e5d13247f55bebbb68b436015aa2407fb200000000020000000141ba32d7bcbe6a57cba91cfc9c6383cfc76223f32337dbc8a96e5b2c4b76c298000000006a473044022032cf8cc9a87203f72b36ccabb88b0c45c2365b443a92fb3d702a771e292e942f02207368cd011db2fe7268ff43060c99d63ae0b0e7050aa80cc7127d2238c5484bf701210227d85ba011276cf25b51df6a188b75e604b38770a462b2d0e9fb2fc839ef5d3ffeffffff026ca2c404000000001976a914b8eff11be15645a3dedbbc5fecb98087c329e3ae88ac002d3101000000001976a9142b4569203694fc997e13f2c0a1383b9e16c77a0d88ac13000000020000000100e18a4984840a9c0f0ce5a3df0a83c13fa075bafdf29c0101617cdfb4c19df2010000006a47304402203f7e9626a02f2f2244739bff36765cbb8f4fb077deccf4c5af56ad5cf4ed3427022047d7caaf0045f23eda7150c9434d0d8890e4a00b37217686d3524e45f9ae498301210203306a52fd5da001bf511790b38ea9017cf2c2022d7543f5add7541ff9445a6cfeffffff0200879303000000001976a9147808d65f96a8ec3e855d9ee1dbdfd632ce11feb588ac6c1b3101000000001976a9142b4569203694fc997e13f2c0a1383b9e16c77a0d88ac660000000200000001215f28057f804eda0610739ac7f8853023c9f2547d934c283ddde8c42cf89c4c010000006a47304402201c4dfca3d2cedf462fee8f53932cc820dc10858b4fb3bfcf8b715f612355bd3f0220118ec5e33f14c366de4d78aceffcdec8757cf0c91bbbc989465d5c8d8104f00b01210227d85ba011276cf25b51df6a188b75e604b38770a462b2d0e9fb2fc839ef5d3ffeffffff0186283101000000001976a9142b4569203694fc997e13f2c0a1383b9e16c77a0d88ac66000000"
|
||||
"00000020bb47178c6cc901e281828e1a526a57e91f9ef31ba6be4a21273f39606c1a2af1cdfdaadac3d84bcd14b3bd4cc965d8d5ccd81355a0a96b1709dd94908fff261e01000000000000000000000000000000000000000000000000000000000000002b4ae75affff7f20010000000202000000010000000000000000000000000000000000000000000000000000000000000000ffffffff0401660101ffffffff0294f2f505000000001976a9142b4569203694fc997e13f2c0a1383b9e16c77a0d88ac0000000000000000266a24aa21a9ed52330c7fa327f661b63ed848448e71fa63440d53905fec226ca31ae25a21b878000000000200000001c0d11554e9f1894363c20014df861e1a47b3008cb972a2af2e927764c74e8a19000000006a47304402204c70240b072ed4b3b22b97660dd92e9b373ec49bb23e40a8c70ec28bcd5463bd0220106702d60d8a0290561980ef8de8cdf38b3b3080d6388a895c5ad5f76fee829201210227d85ba011276cf25b51df6a188b75e604b38770a462b2d0e9fb2fc839ef5d3ffeffffff0200b4c404000000001976a9140b083b5ce046a4848de190c53be2f9ce4a39d75288ac6c1b3101000000001976a9142b4569203694fc997e13f2c0a1383b9e16c77a0d88ac65000000",
|
||||
"0000002015390cb053778fbdd1db2dccf881505975d614ed47b9db6161ee3cccb8f5906db2c2932c8ece24b3d6d9310fc64dfce5948aa1bfefc22651ea2c105cf8d2e4f401000000000000000000000000000000000000000000000000000000000000002b4ae75affff7f20010000000402000000010000000000000000000000000000000000000000000000000000000000000000ffffffff0401670101ffffffff02a208f605000000001976a9142b4569203694fc997e13f2c0a1383b9e16c77a0d88ac0000000000000000266a24aa21a9ed269d2d170475b8c4592dd4f9e5cd451b3e232a60acc3bf1c04937a4ed5fc76bf000000000200000001cf8f252c570e46f00ee376347c567d6d7c38d04540d7297e01f2cf5f8d9a5e0f000000006a47304402204444ca874269fe4d4d9b664644f0a290097cb2611c1be2611b2e0f4c63a63fb60220128bca69cb06d9b34130c3ec525052e110c90d716189fab457c7e70f28d9d33e0121031d54255e9c933267096c5194d1bca2fd2821506d9f58cae299a32f25622af347feffffff0200879303000000001976a914173f5bab5538184d45c591ed1123061f42a32c2b88ac6c1b3101000000001976a9142b4569203694fc997e13f2c0a1383b9e16c77a0d88ac66000000020000000141ba32d7bcbe6a57cba91cfc9c6383cfc76223f32337dbc8a96e5b2c4b76c298000000006a473044022004b9fc2211fc858491750e98bfa1a29b85e660ac8bfab7411a7e49c7752905a2022049820ed986fa7dabc8e0b9f05cf2fda417d15c5dd059070feac7a793bac6398001210227d85ba011276cf25b51df6a188b75e604b38770a462b2d0e9fb2fc839ef5d3ffeffffff02002d3101000000001976a9142b4569203694fc997e13f2c0a1383b9e16c77a0d88ac6ca2c404000000001976a91447f9fda3a6a8dcc3e1b44bcdda9028ad8dc1741888ac6600000002000000014674d2603d28998249e69b1b4a84f2c231d7054116861edf2ae0c446944de45c000000006a473044022065d016e19585209cf242b7c9059f7fc7d813d27dfe0a7ad4c5380864d62aa805022066c5bda4e5e1ed05225e942bec5554cb23ac6a6f351ce1ad25ab5f411e39fa6a01210227d85ba011276cf25b51df6a188b75e604b38770a462b2d0e9fb2fc839ef5d3ffeffffff0186283101000000001976a9142b4569203694fc997e13f2c0a1383b9e16c77a0d88ac66000000"
|
||||
],
|
||||
"mocktime": 1525107225,
|
||||
"stats": [
|
||||
|
@ -148,7 +148,7 @@
|
|||
"avgfee": 4500,
|
||||
"avgfeerate": 20,
|
||||
"avgtxsize": 225,
|
||||
"blockhash": "acdf7e955bf47a8da4c2eee6ad86b1ca9d2d22ddd291c475a01159320fc03a69",
|
||||
"blockhash": "6d90f5b8cc3cee6161dbb947ed14d675595081f8cc2ddbd1bd8f7753b00c3915",
|
||||
"feerate_percentiles": [
|
||||
20,
|
||||
20,
|
||||
|
@ -185,7 +185,7 @@
|
|||
"avgfee": 3382,
|
||||
"avgfeerate": 15,
|
||||
"avgtxsize": 213,
|
||||
"blockhash": "010649bcb1936486752ad004a3d2159b12df7b60953ffde6e12b76e54df8092f",
|
||||
"blockhash": "62ee9871eb89b88381ea7a6470558c7b57d7cc8ea6a0b50669df4170a8150f15",
|
||||
"feerate_percentiles": [
|
||||
6,
|
||||
6,
|
||||
|
|
|
@ -275,7 +275,7 @@ class MempoolPackagesTest(BitcoinTestFramework):
|
|||
for i in range(6):
|
||||
(txid, sent_value) = self.chain_transaction(self.nodes[0], txid, vout, value, fee, 1)
|
||||
vout = 0
|
||||
value = sent_value
|
||||
value = max(sent_value, 0.00000001)
|
||||
|
||||
# Mine these in a block
|
||||
self.nodes[0].generate(1)
|
||||
|
|
|
@ -428,14 +428,14 @@ class PSBTTest(BitcoinTestFramework):
|
|||
assert_equal(analysis['next'], 'creator')
|
||||
assert_equal(analysis['error'], 'PSBT is not valid. Input 0 spends unspendable output')
|
||||
|
||||
self.log.info("PSBT with invalid values should have error message and Creator as next")
|
||||
analysis = self.nodes[0].analyzepsbt('cHNidP8BAHECAAAAAfA00BFgAm6tp86RowwH6BMImQNL5zXUcTT97XoLGz0BAAAAAAD/////AgD5ApUAAAAAFgAUKNw0x8HRctAgmvoevm4u1SbN7XL87QKVAAAAABYAFPck4gF7iL4NL4wtfRAKgQbghiTUAAAAAAABAR8AgIFq49AHABYAFJUDtxf2PHo641HEOBOAIvFMNTr2AAAA')
|
||||
assert_equal(analysis['next'], 'creator')
|
||||
assert_equal(analysis['error'], 'PSBT is not valid. Input 0 has invalid value')
|
||||
# self.log.info("PSBT with invalid values should have error message and Creator as next")
|
||||
# analysis = self.nodes[0].analyzepsbt('cHNidP8BAHECAAAAAfA00BFgAm6tp86RowwH6BMImQNL5zXUcTT97XoLGz0BAAAAAAD/////AgD5ApUAAAAAFgAUKNw0x8HRctAgmvoevm4u1SbN7XL87QKVAAAAABYAFPck4gF7iL4NL4wtfRAKgQbghiTUAAAAAAABAR8AgIFq49AHABYAFJUDtxf2PHo641HEOBOAIvFMNTr2AAAA')
|
||||
# assert_equal(analysis['next'], 'creator')
|
||||
# assert_equal(analysis['error'], 'PSBT is not valid. Input 0 has invalid value')
|
||||
|
||||
analysis = self.nodes[0].analyzepsbt('cHNidP8BAHECAAAAAfA00BFgAm6tp86RowwH6BMImQNL5zXUcTT97XoLGz0BAAAAAAD/////AgCAgWrj0AcAFgAUKNw0x8HRctAgmvoevm4u1SbN7XL87QKVAAAAABYAFPck4gF7iL4NL4wtfRAKgQbghiTUAAAAAAABAR8A8gUqAQAAABYAFJUDtxf2PHo641HEOBOAIvFMNTr2AAAA')
|
||||
assert_equal(analysis['next'], 'creator')
|
||||
assert_equal(analysis['error'], 'PSBT is not valid. Output amount invalid')
|
||||
# analysis = self.nodes[0].analyzepsbt('cHNidP8BAHECAAAAAfA00BFgAm6tp86RowwH6BMImQNL5zXUcTT97XoLGz0BAAAAAAD/////AgCAgWrj0AcAFgAUKNw0x8HRctAgmvoevm4u1SbN7XL87QKVAAAAABYAFPck4gF7iL4NL4wtfRAKgQbghiTUAAAAAAABAR8A8gUqAQAAABYAFJUDtxf2PHo641HEOBOAIvFMNTr2AAAA')
|
||||
# assert_equal(analysis['next'], 'creator')
|
||||
# assert_equal(analysis['error'], 'PSBT is not valid. Output amount invalid')
|
||||
|
||||
analysis = self.nodes[0].analyzepsbt('cHNidP8BAJoCAAAAAkvEW8NnDtdNtDpsmze+Ht2LH35IJcKv00jKAlUs21RrAwAAAAD/////S8Rbw2cO1020OmybN74e3Ysffkglwq/TSMoCVSzbVGsBAAAAAP7///8CwLYClQAAAAAWABSNJKzjaUb3uOxixsvh1GGE3fW7zQD5ApUAAAAAFgAUKNw0x8HRctAgmvoevm4u1SbN7XIAAAAAAAEAnQIAAAACczMa321tVHuN4GKWKRncycI22aX3uXgwSFUKM2orjRsBAAAAAP7///9zMxrfbW1Ue43gYpYpGdzJwjbZpfe5eDBIVQozaiuNGwAAAAAA/v///wIA+QKVAAAAABl2qRT9zXUVA8Ls5iVqynLHe5/vSe1XyYisQM0ClQAAAAAWABRmWQUcjSjghQ8/uH4Bn/zkakwLtAAAAAAAAQEfQM0ClQAAAAAWABRmWQUcjSjghQ8/uH4Bn/zkakwLtAAAAA==')
|
||||
assert_equal(analysis['next'], 'creator')
|
||||
|
|
|
@ -289,7 +289,7 @@ class AvoidReuseTest(BitcoinTestFramework):
|
|||
# getbalances and listunspent should show the remaining outputs
|
||||
# in the reused address as used/reused
|
||||
assert_unspent(self.nodes[1], total_count=2, total_sum=0.12, reused_count=1, reused_sum=0.02)
|
||||
assert_balances(self.nodes[1], mine={"used": 0, "trusted": 0.12})
|
||||
assert_balances(self.nodes[1], mine={"used": 0.02, "trusted": 0.1})
|
||||
|
||||
if __name__ == '__main__':
|
||||
AvoidReuseTest().main()
|
||||
|
|
|
@ -86,9 +86,9 @@ class WalletTest(BitcoinTestFramework):
|
|||
|
||||
self.log.info("Test getbalance with different arguments")
|
||||
assert_equal(self.nodes[0].getbalance("*"), 1)
|
||||
assert_equal(self.nodes[0].getbalance("*", 1), 2)
|
||||
assert_equal(self.nodes[0].getbalance("*", 1, True), 3)
|
||||
assert_equal(self.nodes[0].getbalance(minconf=1), 2)
|
||||
assert_equal(self.nodes[0].getbalance("*", 1), 1)
|
||||
assert_equal(self.nodes[0].getbalance("*", 1, True), 2)
|
||||
assert_equal(self.nodes[0].getbalance(minconf=1), 1)
|
||||
assert_equal(self.nodes[0].getbalance(minconf=0, include_watchonly=True), 2)
|
||||
assert_equal(self.nodes[1].getbalance(minconf=0, include_watchonly=True), 1)
|
||||
|
||||
|
@ -117,8 +117,8 @@ class WalletTest(BitcoinTestFramework):
|
|||
assert_equal(self.nodes[1].getbalance(minconf=0), Decimal('0.39') - fee_node_1)
|
||||
# getbalance with a minconf incorrectly excludes coins that have been spent more recently than the minconf blocks ago
|
||||
# TODO: fix getbalance tracking of coin spentness depth
|
||||
assert_equal(self.nodes[0].getbalance(minconf=1), Decimal('1.59'))
|
||||
assert_equal(self.nodes[1].getbalance(minconf=1), Decimal('0.39') - fee_node_1)
|
||||
assert_equal(self.nodes[0].getbalance(minconf=1), Decimal('0.00'))
|
||||
assert_equal(self.nodes[1].getbalance(minconf=1), Decimal('0.00'))
|
||||
# getunconfirmedbalance
|
||||
assert_equal(self.nodes[0].getunconfirmedbalance(), Decimal('0.6')) # output of node 1's spend
|
||||
assert_equal(self.nodes[0].getbalances()['mine']['untrusted_pending'], Decimal('0.6'))
|
||||
|
|
|
@ -95,7 +95,7 @@ class TxnMallTest(BitcoinTestFramework):
|
|||
# matured block, minus tx1 and tx2 amounts, and minus transaction fees:
|
||||
expected = starting_balance + node0_tx1["fee"] + node0_tx2["fee"]
|
||||
if self.options.mine_block:
|
||||
expected += 50
|
||||
expected += 1
|
||||
expected += tx1["amount"] + tx1["fee"]
|
||||
expected += tx2["amount"] + tx2["fee"]
|
||||
assert_equal(self.nodes[0].getbalance(), expected)
|
||||
|
@ -138,7 +138,7 @@ class TxnMallTest(BitcoinTestFramework):
|
|||
# less possible orphaned matured subsidy
|
||||
expected += 2
|
||||
if (self.options.mine_block):
|
||||
expected -= 50
|
||||
expected -= 1
|
||||
assert_equal(self.nodes[0].getbalance(), expected)
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
Loading…
Reference in a new issue