[bitcoin/bitcoin] BIP 174 PSBT Serializations and RPCs (#13557)

achow101 commented on this pull request.

> + // Read in key path
+ uint64_t value_len = ReadCompactSize(s);
+ std::vector keypath;
+ for (unsigned int i = 0; i > index;
+ keypath.push_back(index);
+ }
+
+ // Add to map
+ hd_keypaths.emplace(pubkey, keypath);
+}
+
+// Serialize HD keypaths to a stream from a map
+template
+void SerializeHDKeypaths(Stream& s, const std::map>& hd_keypaths, uint8_t type)

Since the fingerprint is a 4 byte value, we store it with the keypaths as the first element of the `std::vector`

This post was last modified on July 6, 2018, 8:26 pm