Beispiel #1
0
func (to *TxOut) SetScript(script []byte) {
	to.PkScript = script
	to.PkScriptLength = mymath.VarInt(len(to.PkScript))
}
Beispiel #2
0
func (to *TxOut) SetScriptStr(script string, opcode byte) {
	to.PkScript = mymath.AddByte(mymath.String2Hex(script), opcode)
	to.PkScriptLength = mymath.VarInt(len(to.PkScript))
}
Beispiel #3
0
func (ti *TxIn) SetSignature(sig []byte) {
	ti.SignatureScript = sig
	ti.ScriptLength = mymath.VarInt(len(ti.SignatureScript))
}