[bitcoin/bitcoin] Implement BIP 174 Partially Signed Bitcoin Transactions (#12136)

achow101 commented on this pull request.

> + s >> sig_data;
+
+ // Add to list
+ input.partial_sigs.emplace(pubkey, sig);
+ }
+ break;
+ // BIP 32 HD Keypaths and sighash types
+ case PSBT_BIP32_KEYPATH_SIGHASH:
+ {
+ if (in_globals) {
+ // Make sure that the key is the size of pubkey + 1
+ if (key.size() != CPubKey::PUBLIC_KEY_SIZE + 1 && key.size() != CPubKey::COMPRESSED_PUBLIC_KEY_SIZE + 1) {
+ throw std::ios_base::failure(«Size of key was not the expected size for the type BIP32 keypath»);
+ }
+ // Read in the pubkey from key
+ CPubKey pubkey(key.begin() + 1, key.end());

Done

Запись редактировалась последний раз: May 30, 2018, 11:04 pm