mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Merge 8e1704c015 into merged_master (Bitcoin PR #15559)
This commit is contained in:
commit
32a1b86572
2 changed files with 9 additions and 9 deletions
|
|
@ -1976,21 +1976,21 @@ UniValue analyzepsbt(const JSONRPCRequest& request)
|
|||
" \"has_utxo\" : true|false (boolean) Whether a UTXO is provided\n"
|
||||
" \"is_final\" : true|false (boolean) Whether the input is finalized\n"
|
||||
" \"missing\" : { (json object, optional) Things that are missing that are required to complete this input\n"
|
||||
" \"pubkeys\" : [ (array)\n"
|
||||
" \"pubkeys\" : [ (array, optional)\n"
|
||||
" \"keyid\" (string) Public key ID, hash160 of the public key, of a public key whose BIP 32 derivation path is missing\n"
|
||||
" ]\n"
|
||||
" \"signatures\" : [ (array)\n"
|
||||
" \"signatures\" : [ (array, optional)\n"
|
||||
" \"keyid\" (string) Public key ID, hash160 of the public key, of a public key whose signature is missing\n"
|
||||
" ]\n"
|
||||
" \"redeemscript\" : \"hash\" (string) Hash160 of the redeemScript that is missing\n"
|
||||
" \"witnessscript\" : \"hash\" (string) SHA256 of the witnessScript that is missing\n"
|
||||
" \"redeemscript\" : \"hash\" (string, optional) Hash160 of the redeemScript that is missing\n"
|
||||
" \"witnessscript\" : \"hash\" (string, optional) SHA256 of the witnessScript that is missing\n"
|
||||
" }\n"
|
||||
" \"next\" : \"role\" (string) Role of the next person that this input needs to go to\n"
|
||||
" \"next\" : \"role\" (string, optional) Role of the next person that this input needs to go to\n"
|
||||
" }\n"
|
||||
" ,...\n"
|
||||
" ]\n"
|
||||
" \"estimated_vsize\" : vsize (numeric) Estimated vsize of the final signed transaction\n"
|
||||
" \"estimated_feerate\" : feerate (numeric, optional) Estimated feerate of the final signed transaction. Shown only if all UTXO slots in the PSBT have been filled.\n"
|
||||
" \"estimated_vsize\" : vsize (numeric, optional) Estimated vsize of the final signed transaction\n"
|
||||
" \"estimated_feerate\" : feerate (numeric, optional) Estimated feerate of the final signed transaction in " + CURRENCY_UNIT + "/kB. Shown only if all UTXO slots in the PSBT have been filled.\n"
|
||||
" \"fee\" : fee (numeric, optional) The transaction fee paid. Shown only if all UTXO slots in the PSBT have been filled.\n"
|
||||
" \"next\" : \"role\" (string) Role of the next person that this psbt needs to go to\n"
|
||||
"}\n"
|
||||
|
|
@ -2137,7 +2137,7 @@ UniValue analyzepsbt(const JSONRPCRequest& request)
|
|||
result.pushKV("estimated_vsize", (int)size);
|
||||
// Estimate fee rate
|
||||
CFeeRate feerate(fee[::policyAsset], size);
|
||||
result.pushKV("estimated_feerate", feerate.ToString());
|
||||
result.pushKV("estimated_feerate", ValueFromAmount(feerate.GetFeePerK()));
|
||||
}
|
||||
result.pushKV("fee", AmountMapToUniv(fee, ""));
|
||||
|
||||
|
|
|
|||
|
|
@ -357,7 +357,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…
Add table
Add a link
Reference in a new issue