btcsuite / btcd

An alternative full node bitcoin implementation written in Go (golang)
https://github.com/btcsuite/btcd/blob/master/README.md
ISC License
6.11k stars 2.32k forks source link

chainhash: JSON Unmarshal hash from string #1951

Closed LindenWang01 closed 1 year ago

LindenWang01 commented 1 year ago

chainhash: JSON Unmarshal hash from appropriate string. This commit(https://github.com/btcsuite/btcd/commit/1d6e578c2180a6ee45755270dd938894fb93d661) occurred a problem: "error": "json: cannot unmarshal string into Go struct field OutPoint.TxIn.PreviousOutPoint.Hash of type chainhash.Hash"

fix it.

LindenWang01 commented 1 year ago

In our business scenario, we need to serialize the wire. MsgTx structure. This error occurred in the process of json.Unmarshal