(t testing.TB, tx *legacy.Tx, index uint32)
| 48 | } |
| 49 | |
| 50 | func (d *testDest) sign(t testing.TB, tx *legacy.Tx, index uint32) { |
| 51 | txsighash := tx.SigHash(index) |
| 52 | prog, _ := vm.Assemble(fmt.Sprintf("0x%x TXSIGHASH EQUAL", txsighash.Bytes())) |
| 53 | h := sha3.Sum256(prog) |
| 54 | sig := ed25519.Sign(d.privKey, h[:]) |
| 55 | tx.Inputs[index].SetArguments([][]byte{vm.Int64Bytes(0), sig, prog}) |
| 56 | } |
| 57 | |
| 58 | func (d testDest) controlProgram() ([]byte, error) { |
| 59 | pub := d.privKey.Public().(ed25519.PublicKey) |
no test coverage detected