Exemple #1
0
func (to *TxOut) SetScript(script []byte) {
	to.PkScript = script
	to.PkScriptLength = mymath.VarInt(len(to.PkScript))
}
Exemple #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))
}
Exemple #3
0
func (ti *TxIn) SetSignature(sig []byte) {
	ti.SignatureScript = sig
	ti.ScriptLength = mymath.VarInt(len(ti.SignatureScript))
}