mirror of
https://github.com/QuasarApp/QuasarAppCoin.git
synced 2025-04-28 10:44:35 +00:00
rpc: return a number for estimated_feerate in analyzepsbt
Github-Pull: #15559 Rebased-From: 335931df4a37467299a2ee0ba521ecd5c4e6d39e Tree-SHA512: ebe460e935e33fbbbe725db403654ee65c86a606401e8519e1180551e2ccd43661eb4ad20bf065f2c0c2a8026c3bb3bce796789f8d612e9e197ceb8d541a63a9
This commit is contained in:
parent
20fd64fe10
commit
2edd0c40c3
@ -2021,7 +2021,7 @@ UniValue analyzepsbt(const JSONRPCRequest& request)
|
||||
result.pushKV("estimated_vsize", (int)size);
|
||||
// Estimate fee rate
|
||||
CFeeRate feerate(fee, size);
|
||||
result.pushKV("estimated_feerate", feerate.ToString());
|
||||
result.pushKV("estimated_feerate", ValueFromAmount(feerate.GetFeePerK()));
|
||||
}
|
||||
result.pushKV("fee", ValueFromAmount(fee));
|
||||
|
||||
|
@ -355,7 +355,7 @@ class PSBTTest(BitcoinTestFramework):
|
||||
assert analyzed['inputs'][0]['has_utxo'] and not analyzed['inputs'][0]['is_final'] and analyzed['inputs'][0]['next'] == 'signer' and analyzed['next'] == 'signer' and analyzed['inputs'][0]['missing']['signatures'][0] == addrinfo['embedded']['witness_program']
|
||||
|
||||
# Check fee and size things
|
||||
assert analyzed['fee'] == Decimal('0.001') and analyzed['estimated_vsize'] == 134 and analyzed['estimated_feerate'] == '0.00746268 BTC/kB'
|
||||
assert analyzed['fee'] == Decimal('0.001') and analyzed['estimated_vsize'] == 134 and analyzed['estimated_feerate'] == Decimal('0.00746268')
|
||||
|
||||
# After signing and finalizing, needs extracting
|
||||
signed = self.nodes[1].walletprocesspsbt(updated)['psbt']
|
||||
|
Loading…
x
Reference in New Issue
Block a user