mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-29 02:11:24 +02:00
rpc: deprecate fee fields from mempool entries
Unless `-deprecatedrpc=fees` is passed, top level fee fields are no longer returned for mempool entries. Add instructions to field help on how to access deprecated fields, update help text for readability, and include units. This is important to help avoid any confusion as users move from deprecated fields to the fee fields object (credit: jonatack). This affects `getmempoolentry`, `getrawmempool`, `getmempoolancestors`, and `getmempooldescendants` Modify `test/functional/mempool_packages.py` and `test/functional/rpc_fundrawtransaction.py` tests to no longer use deprecated fields. Co-authored-by: jonatack <jon@atack.com>
This commit is contained in:
@ -417,7 +417,7 @@ class RawTransactionsTest(BitcoinTestFramework):
|
||||
|
||||
# Create same transaction over sendtoaddress.
|
||||
txId = self.nodes[0].sendtoaddress(self.nodes[1].getnewaddress(), 1.1)
|
||||
signedFee = self.nodes[0].getmempoolentry(txId)['fee']
|
||||
signedFee = self.nodes[0].getmempoolentry(txId)['fees']['base']
|
||||
|
||||
# Compare fee.
|
||||
feeDelta = Decimal(fundedTx['fee']) - Decimal(signedFee)
|
||||
@ -443,7 +443,7 @@ class RawTransactionsTest(BitcoinTestFramework):
|
||||
|
||||
# Create same transaction over sendtoaddress.
|
||||
txId = self.nodes[0].sendmany("", outputs)
|
||||
signedFee = self.nodes[0].getmempoolentry(txId)['fee']
|
||||
signedFee = self.nodes[0].getmempoolentry(txId)['fees']['base']
|
||||
|
||||
# Compare fee.
|
||||
feeDelta = Decimal(fundedTx['fee']) - Decimal(signedFee)
|
||||
@ -470,7 +470,7 @@ class RawTransactionsTest(BitcoinTestFramework):
|
||||
|
||||
# Create same transaction over sendtoaddress.
|
||||
txId = self.nodes[0].sendtoaddress(mSigObj, 1.1)
|
||||
signedFee = self.nodes[0].getmempoolentry(txId)['fee']
|
||||
signedFee = self.nodes[0].getmempoolentry(txId)['fees']['base']
|
||||
|
||||
# Compare fee.
|
||||
feeDelta = Decimal(fundedTx['fee']) - Decimal(signedFee)
|
||||
@ -514,7 +514,7 @@ class RawTransactionsTest(BitcoinTestFramework):
|
||||
|
||||
# Create same transaction over sendtoaddress.
|
||||
txId = self.nodes[0].sendtoaddress(mSigObj, 1.1)
|
||||
signedFee = self.nodes[0].getmempoolentry(txId)['fee']
|
||||
signedFee = self.nodes[0].getmempoolentry(txId)['fees']['base']
|
||||
|
||||
# Compare fee.
|
||||
feeDelta = Decimal(fundedTx['fee']) - Decimal(signedFee)
|
||||
@ -651,7 +651,7 @@ class RawTransactionsTest(BitcoinTestFramework):
|
||||
|
||||
# Create same transaction over sendtoaddress.
|
||||
txId = self.nodes[1].sendmany("", outputs)
|
||||
signedFee = self.nodes[1].getmempoolentry(txId)['fee']
|
||||
signedFee = self.nodes[1].getmempoolentry(txId)['fees']['base']
|
||||
|
||||
# Compare fee.
|
||||
feeDelta = Decimal(fundedTx['fee']) - Decimal(signedFee)
|
||||
|
Reference in New Issue
Block a user