-
Notifications
You must be signed in to change notification settings - Fork 57
Open
Description
We should change the way we serialize utxos to match Bitcoin Core:
https://github.com/bitcoin/bitcoin/blob/398dd678338971d2189934713c83c184742f293f/src/coins.h#L60-L65
vs ours:
Lines 75 to 82 in 2faac6f
| err = binary.Write(w, binary.BigEndian, hcb) | |
| err = binary.Write(w, binary.BigEndian, l.Amt) | |
| if len(l.PkScript) > 10000 { | |
| err = fmt.Errorf("pksize too long") | |
| return | |
| } | |
| err = binary.Write(w, binary.BigEndian, uint16(len(l.PkScript))) | |
| _, err = w.Write(l.PkScript) |
This has several benfits:
- its easier to make the utcd node and Bitcoin Core bridge i am working on compatible.
- saves bandwidth because of the compression that core uses
Metadata
Metadata
Assignees
Labels
No labels