The only errors returned are those from w.
(w io.Writer)
| 273 | |
| 274 | // The only errors returned are those from w. |
| 275 | func (tx *Tx) writeWitnessHashTo(w io.Writer) (int, error) { |
| 276 | // See $I10R/docs/future/protocol/specifications/txvm.md#transaction-witness |
| 277 | // for the definition of the transaction witness and |
| 278 | // $I10R/docs/future/protocol/specifications/blockchain.md#transaction-witness-commitment |
| 279 | // for the definition of the transaction witness commitment. |
| 280 | h := txvm.VMHash("WitnessHash", txvm.Encode(txvm.Tuple{ |
| 281 | txvm.Int(tx.Version), |
| 282 | txvm.Int(tx.Runlimit), |
| 283 | txvm.Bytes(tx.Program), |
| 284 | })) |
| 285 | return w.Write(h[:]) |
| 286 | } |