diff options
| author | Pieter Wuille <[email protected]> | 2018-07-19 23:15:53 -0700 |
|---|---|---|
| committer | Pieter Wuille <[email protected]> | 2018-08-13 08:46:23 -0700 |
| commit | 611ab307fbd8b6f8f7ffc1d569bb86d1f9cb4e92 (patch) | |
| tree | 3e1d154a642cc9be174e4a88c3c092954fba71bc /src/rpc/rawtransaction.cpp | |
| parent | More tests of signer checks (diff) | |
| download | discoin-611ab307fbd8b6f8f7ffc1d569bb86d1f9cb4e92.tar.xz discoin-611ab307fbd8b6f8f7ffc1d569bb86d1f9cb4e92.zip | |
Introduce KeyOriginInfo for fingerprint + path
Diffstat (limited to 'src/rpc/rawtransaction.cpp')
| -rw-r--r-- | src/rpc/rawtransaction.cpp | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp index 608a1b5da..8d96add13 100644 --- a/src/rpc/rawtransaction.cpp +++ b/src/rpc/rawtransaction.cpp @@ -1460,11 +1460,8 @@ UniValue decodepsbt(const JSONRPCRequest& request) UniValue keypath(UniValue::VOBJ); keypath.pushKV("pubkey", HexStr(entry.first)); - uint32_t fingerprint = entry.second.at(0); - keypath.pushKV("master_fingerprint", strprintf("%08x", bswap_32(fingerprint))); - - entry.second.erase(entry.second.begin()); - keypath.pushKV("path", WriteHDKeypath(entry.second)); + keypath.pushKV("master_fingerprint", strprintf("%08x", ReadBE32(entry.second.fingerprint))); + keypath.pushKV("path", WriteHDKeypath(entry.second.path)); keypaths.push_back(keypath); } in.pushKV("bip32_derivs", keypaths); @@ -1522,12 +1519,8 @@ UniValue decodepsbt(const JSONRPCRequest& request) for (auto entry : output.hd_keypaths) { UniValue keypath(UniValue::VOBJ); keypath.pushKV("pubkey", HexStr(entry.first)); - - uint32_t fingerprint = entry.second.at(0); - keypath.pushKV("master_fingerprint", strprintf("%08x", bswap_32(fingerprint))); - - entry.second.erase(entry.second.begin()); - keypath.pushKV("path", WriteHDKeypath(entry.second)); + keypath.pushKV("master_fingerprint", strprintf("%08x", ReadBE32(entry.second.fingerprint))); + keypath.pushKV("path", WriteHDKeypath(entry.second.path)); keypaths.push_back(keypath); } out.pushKV("bip32_derivs", keypaths); |