mirror of
https://github.com/btcsuite/btcd.git
synced 2025-03-10 09:19:28 +01:00
psbt: encode global unknowns
This commit is contained in:
parent
19c7c3d853
commit
5ebbb1bb91
1 changed files with 9 additions and 0 deletions
|
@ -319,6 +319,15 @@ func (p *Packet) Serialize(w io.Writer) error {
|
|||
return err
|
||||
}
|
||||
|
||||
// Unknown is a special case; we don't have a key type, only a key and
|
||||
// a value field
|
||||
for _, kv := range p.Unknowns {
|
||||
err := serializeKVpair(w, kv.Key, kv.Value)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
// With that our global section is done, so we'll write out the
|
||||
// separator.
|
||||
separator := []byte{0x00}
|
||||
|
|
Loading…
Add table
Reference in a new issue