2021-09-10 17:29:32 +00:00
|
|
|
package event
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
2021-09-13 09:02:32 +00:00
|
|
|
"github.com/nspcc-dev/neo-go/pkg/vm"
|
|
|
|
|
2022-12-23 17:35:35 +00:00
|
|
|
"github.com/TrueCloudLab/frostfs-node/pkg/morph/client"
|
2021-09-10 17:29:32 +00:00
|
|
|
"github.com/nspcc-dev/neo-go/pkg/core/interop/interopnames"
|
|
|
|
"github.com/nspcc-dev/neo-go/pkg/core/transaction"
|
|
|
|
"github.com/nspcc-dev/neo-go/pkg/crypto/hash"
|
|
|
|
"github.com/nspcc-dev/neo-go/pkg/crypto/keys"
|
|
|
|
"github.com/nspcc-dev/neo-go/pkg/io"
|
|
|
|
"github.com/nspcc-dev/neo-go/pkg/network/payload"
|
|
|
|
"github.com/nspcc-dev/neo-go/pkg/smartcontract"
|
|
|
|
"github.com/nspcc-dev/neo-go/pkg/smartcontract/callflag"
|
|
|
|
"github.com/nspcc-dev/neo-go/pkg/util"
|
|
|
|
"github.com/nspcc-dev/neo-go/pkg/vm/emit"
|
|
|
|
"github.com/nspcc-dev/neo-go/pkg/vm/opcode"
|
|
|
|
"github.com/stretchr/testify/require"
|
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
2021-09-14 20:23:35 +00:00
|
|
|
alphaKeys keys.PublicKeys
|
|
|
|
wrongAlphaKeys keys.PublicKeys
|
2021-09-10 17:29:32 +00:00
|
|
|
|
2021-09-14 20:23:35 +00:00
|
|
|
dummyInvocationScript = append([]byte{byte(opcode.PUSHDATA1), 64}, make([]byte, 64)...)
|
|
|
|
wrongDummyInvocationScript = append([]byte{byte(opcode.PUSHDATA1), 64, 1}, make([]byte, 63)...)
|
|
|
|
|
2021-09-10 17:29:32 +00:00
|
|
|
scriptHash util.Uint160
|
|
|
|
)
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
privat, _ := keys.NewPrivateKey()
|
|
|
|
pub := privat.PublicKey()
|
|
|
|
|
|
|
|
alphaKeys = keys.PublicKeys{pub}
|
|
|
|
|
2021-09-14 20:23:35 +00:00
|
|
|
wrongPrivat, _ := keys.NewPrivateKey()
|
|
|
|
wrongPub := wrongPrivat.PublicKey()
|
|
|
|
|
|
|
|
wrongAlphaKeys = keys.PublicKeys{wrongPub}
|
|
|
|
|
2021-09-10 17:29:32 +00:00
|
|
|
scriptHash, _ = util.Uint160DecodeStringLE("21fce15191428e9c2f0e8d0329ff6d3dd14882de")
|
|
|
|
}
|
|
|
|
|
|
|
|
type blockCounter struct {
|
|
|
|
epoch uint32
|
|
|
|
err error
|
|
|
|
}
|
|
|
|
|
|
|
|
func (b blockCounter) BlockCount() (res uint32, err error) {
|
|
|
|
return b.epoch, b.err
|
|
|
|
}
|
|
|
|
|
2021-09-14 20:38:14 +00:00
|
|
|
func TestPrepare_IncorrectScript(t *testing.T) {
|
|
|
|
preparator := notaryPreparator(
|
|
|
|
PreparatorPrm{
|
|
|
|
alphaKeysSource(),
|
|
|
|
blockCounter{100, nil},
|
|
|
|
},
|
|
|
|
)
|
|
|
|
|
|
|
|
t.Run("not contract call", func(t *testing.T) {
|
|
|
|
bw := io.NewBufBinWriter()
|
|
|
|
|
|
|
|
emit.Int(bw.BinWriter, 4)
|
|
|
|
emit.String(bw.BinWriter, "test")
|
|
|
|
emit.Bytes(bw.BinWriter, scriptHash.BytesBE())
|
2021-09-20 15:59:50 +00:00
|
|
|
emit.Syscall(bw.BinWriter, interopnames.SystemContractCallNative) // any != interopnames.SystemContractCall
|
2021-09-14 20:38:14 +00:00
|
|
|
|
2021-11-25 16:40:33 +00:00
|
|
|
nr := correctNR(bw.Bytes(), false)
|
2021-09-14 20:38:14 +00:00
|
|
|
|
|
|
|
_, err := preparator.Prepare(nr)
|
|
|
|
|
|
|
|
require.EqualError(t, err, errNotContractCall.Error())
|
|
|
|
})
|
|
|
|
|
|
|
|
t.Run("incorrect ", func(t *testing.T) {
|
|
|
|
bw := io.NewBufBinWriter()
|
|
|
|
|
|
|
|
emit.Int(bw.BinWriter, -1)
|
|
|
|
emit.String(bw.BinWriter, "test")
|
|
|
|
emit.Bytes(bw.BinWriter, scriptHash.BytesBE())
|
|
|
|
emit.Syscall(bw.BinWriter, interopnames.SystemContractCall)
|
|
|
|
|
2021-11-25 16:40:33 +00:00
|
|
|
nr := correctNR(bw.Bytes(), false)
|
2021-09-14 20:38:14 +00:00
|
|
|
|
|
|
|
_, err := preparator.Prepare(nr)
|
|
|
|
|
|
|
|
require.EqualError(t, err, errIncorrectCallFlag.Error())
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
2021-09-14 20:23:35 +00:00
|
|
|
func TestPrepare_IncorrectNR(t *testing.T) {
|
|
|
|
type (
|
|
|
|
mTX struct {
|
|
|
|
sigs []transaction.Signer
|
|
|
|
scripts []transaction.Witness
|
|
|
|
attrs []transaction.Attribute
|
|
|
|
}
|
|
|
|
fbTX struct {
|
|
|
|
attrs []transaction.Attribute
|
|
|
|
}
|
|
|
|
)
|
|
|
|
|
|
|
|
setIncorrectFields := func(nr payload.P2PNotaryRequest, m mTX, f fbTX) payload.P2PNotaryRequest {
|
|
|
|
if m.sigs != nil {
|
|
|
|
nr.MainTransaction.Signers = m.sigs
|
|
|
|
}
|
|
|
|
|
|
|
|
if m.scripts != nil {
|
|
|
|
nr.MainTransaction.Scripts = m.scripts
|
|
|
|
}
|
|
|
|
|
|
|
|
if m.attrs != nil {
|
|
|
|
nr.MainTransaction.Attributes = m.attrs
|
|
|
|
}
|
|
|
|
|
|
|
|
if f.attrs != nil {
|
|
|
|
nr.FallbackTransaction.Attributes = f.attrs
|
|
|
|
}
|
|
|
|
|
|
|
|
return nr
|
|
|
|
}
|
|
|
|
|
|
|
|
alphaVerificationScript, _ := smartcontract.CreateMultiSigRedeemScript(len(alphaKeys)*2/3+1, alphaKeys)
|
|
|
|
wrongAlphaVerificationScript, _ := smartcontract.CreateMultiSigRedeemScript(len(wrongAlphaKeys)*2/3+1, wrongAlphaKeys)
|
|
|
|
|
|
|
|
tests := []struct {
|
|
|
|
name string
|
2021-11-25 16:40:33 +00:00
|
|
|
addW bool // additional witness for non alphabet invocations
|
2021-09-14 20:23:35 +00:00
|
|
|
mTX mTX
|
|
|
|
fbTX fbTX
|
|
|
|
expErr error
|
|
|
|
}{
|
|
|
|
{
|
|
|
|
name: "incorrect witness amount",
|
2021-11-25 16:40:33 +00:00
|
|
|
addW: false,
|
2021-09-14 20:23:35 +00:00
|
|
|
mTX: mTX{
|
|
|
|
scripts: []transaction.Witness{{}},
|
|
|
|
},
|
|
|
|
expErr: errUnexpectedWitnessAmount,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "not dummy invocation script",
|
2021-11-25 16:40:33 +00:00
|
|
|
addW: false,
|
2021-09-14 20:23:35 +00:00
|
|
|
mTX: mTX{
|
|
|
|
scripts: []transaction.Witness{
|
|
|
|
{},
|
|
|
|
{
|
|
|
|
InvocationScript: wrongDummyInvocationScript,
|
|
|
|
},
|
|
|
|
{},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
expErr: ErrTXAlreadyHandled,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "incorrect main TX signers amount",
|
2021-11-25 16:40:33 +00:00
|
|
|
addW: false,
|
2021-09-14 20:23:35 +00:00
|
|
|
mTX: mTX{
|
|
|
|
sigs: []transaction.Signer{{}},
|
|
|
|
},
|
|
|
|
expErr: errUnexpectedCosignersAmount,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "incorrect main TX Alphabet signer",
|
2021-11-25 16:40:33 +00:00
|
|
|
addW: false,
|
2021-09-14 20:23:35 +00:00
|
|
|
mTX: mTX{
|
|
|
|
sigs: []transaction.Signer{
|
|
|
|
{},
|
|
|
|
{
|
|
|
|
Account: hash.Hash160(wrongAlphaVerificationScript),
|
|
|
|
},
|
|
|
|
{},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
expErr: errIncorrectAlphabetSigner,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "incorrect main TX attribute amount",
|
2021-11-25 16:40:33 +00:00
|
|
|
addW: false,
|
2021-09-14 20:23:35 +00:00
|
|
|
mTX: mTX{
|
|
|
|
attrs: []transaction.Attribute{{}, {}},
|
|
|
|
},
|
|
|
|
expErr: errIncorrectAttributesAmount,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "incorrect main TX attribute",
|
2021-11-25 16:40:33 +00:00
|
|
|
addW: false,
|
2021-09-14 20:23:35 +00:00
|
|
|
mTX: mTX{
|
|
|
|
attrs: []transaction.Attribute{
|
|
|
|
{
|
|
|
|
Value: &transaction.NotaryAssisted{
|
|
|
|
NKeys: uint8(len(alphaKeys) + 1),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
expErr: errIncorrectAttribute,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "incorrect main TX proxy witness",
|
2021-11-25 16:40:33 +00:00
|
|
|
addW: false,
|
2021-09-14 20:23:35 +00:00
|
|
|
mTX: mTX{
|
|
|
|
scripts: []transaction.Witness{
|
|
|
|
{
|
|
|
|
InvocationScript: make([]byte, 1),
|
|
|
|
},
|
|
|
|
{
|
|
|
|
InvocationScript: dummyInvocationScript,
|
|
|
|
},
|
|
|
|
{},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
expErr: errIncorrectProxyWitnesses,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "incorrect main TX Alphabet witness",
|
2021-11-25 16:40:33 +00:00
|
|
|
addW: false,
|
2021-09-14 20:23:35 +00:00
|
|
|
mTX: mTX{
|
|
|
|
scripts: []transaction.Witness{
|
|
|
|
{},
|
|
|
|
{
|
|
|
|
VerificationScript: wrongAlphaVerificationScript,
|
|
|
|
InvocationScript: dummyInvocationScript,
|
|
|
|
},
|
|
|
|
{},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
expErr: errIncorrectAlphabet,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "incorrect main TX Notary witness",
|
2021-11-25 16:40:33 +00:00
|
|
|
addW: false,
|
2021-09-14 20:23:35 +00:00
|
|
|
mTX: mTX{
|
|
|
|
scripts: []transaction.Witness{
|
|
|
|
{},
|
|
|
|
{
|
|
|
|
VerificationScript: alphaVerificationScript,
|
|
|
|
InvocationScript: dummyInvocationScript,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
InvocationScript: wrongDummyInvocationScript,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
expErr: errIncorrectNotaryPlaceholder,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "incorrect fb TX attributes amount",
|
2021-11-25 16:40:33 +00:00
|
|
|
addW: false,
|
2021-09-14 20:23:35 +00:00
|
|
|
fbTX: fbTX{
|
|
|
|
attrs: []transaction.Attribute{{}},
|
|
|
|
},
|
|
|
|
expErr: errIncorrectFBAttributesAmount,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "incorrect fb TX attributes",
|
2021-11-25 16:40:33 +00:00
|
|
|
addW: false,
|
2021-09-14 20:23:35 +00:00
|
|
|
fbTX: fbTX{
|
|
|
|
attrs: []transaction.Attribute{{}, {}, {}},
|
|
|
|
},
|
|
|
|
expErr: errIncorrectFBAttributes,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "expired fb TX",
|
2021-11-25 16:40:33 +00:00
|
|
|
addW: false,
|
2021-09-14 20:23:35 +00:00
|
|
|
fbTX: fbTX{
|
|
|
|
[]transaction.Attribute{
|
|
|
|
{},
|
|
|
|
{
|
|
|
|
Type: transaction.NotValidBeforeT,
|
|
|
|
Value: &transaction.NotValidBefore{
|
|
|
|
Height: 1,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
expErr: ErrMainTXExpired,
|
|
|
|
},
|
2021-11-25 16:40:33 +00:00
|
|
|
{
|
|
|
|
name: "incorrect invoker TX Alphabet witness",
|
|
|
|
addW: true,
|
|
|
|
mTX: mTX{
|
|
|
|
scripts: []transaction.Witness{
|
|
|
|
{},
|
|
|
|
{
|
|
|
|
VerificationScript: alphaVerificationScript,
|
|
|
|
InvocationScript: dummyInvocationScript,
|
|
|
|
},
|
|
|
|
{},
|
|
|
|
{},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
expErr: errIncorrectInvokerWitnesses,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "incorrect main TX attribute with invoker",
|
|
|
|
addW: true,
|
|
|
|
mTX: mTX{
|
|
|
|
attrs: []transaction.Attribute{
|
|
|
|
{
|
|
|
|
Value: &transaction.NotaryAssisted{
|
|
|
|
NKeys: uint8(len(alphaKeys) + 2),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
expErr: errIncorrectAttribute,
|
|
|
|
},
|
2021-09-14 20:23:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
preparator := notaryPreparator(
|
|
|
|
PreparatorPrm{
|
|
|
|
alphaKeysSource(),
|
|
|
|
blockCounter{100, nil},
|
|
|
|
},
|
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
|
|
|
incorrectNR payload.P2PNotaryRequest
|
|
|
|
err error
|
|
|
|
)
|
|
|
|
|
|
|
|
for _, test := range tests {
|
|
|
|
t.Run(test.name, func(t *testing.T) {
|
2021-11-25 16:40:33 +00:00
|
|
|
correctNR := correctNR(nil, test.addW)
|
2021-09-14 20:23:35 +00:00
|
|
|
incorrectNR = setIncorrectFields(*correctNR, test.mTX, test.fbTX)
|
|
|
|
|
|
|
|
_, err = preparator.Prepare(&incorrectNR)
|
|
|
|
|
|
|
|
require.EqualError(t, err, test.expErr.Error())
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-09-10 17:29:32 +00:00
|
|
|
func TestPrepare_CorrectNR(t *testing.T) {
|
|
|
|
tests := []struct {
|
|
|
|
hash util.Uint160
|
|
|
|
method string
|
2023-02-21 11:42:45 +00:00
|
|
|
args []any
|
2021-09-10 17:29:32 +00:00
|
|
|
}{
|
|
|
|
{
|
|
|
|
scriptHash,
|
|
|
|
"test1",
|
|
|
|
nil,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
scriptHash,
|
|
|
|
"test2",
|
2023-02-21 11:42:45 +00:00
|
|
|
[]any{
|
2021-09-10 17:29:32 +00:00
|
|
|
int64(4),
|
|
|
|
"test",
|
2023-02-21 11:42:45 +00:00
|
|
|
[]any{
|
2021-09-10 17:29:32 +00:00
|
|
|
int64(4),
|
|
|
|
false,
|
|
|
|
true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
preparator := notaryPreparator(
|
|
|
|
PreparatorPrm{
|
|
|
|
alphaKeysSource(),
|
|
|
|
blockCounter{100, nil},
|
|
|
|
},
|
|
|
|
)
|
|
|
|
|
|
|
|
for _, test := range tests {
|
2021-11-25 16:40:33 +00:00
|
|
|
for i := 0; i < 1; i++ { // run tests against 3 and 4 witness NR
|
|
|
|
additionalWitness := i == 0
|
|
|
|
nr := correctNR(script(test.hash, test.method, test.args...), additionalWitness)
|
2021-09-10 17:29:32 +00:00
|
|
|
|
2021-11-25 16:40:33 +00:00
|
|
|
event, err := preparator.Prepare(nr)
|
2021-09-10 17:29:32 +00:00
|
|
|
|
2021-11-25 16:40:33 +00:00
|
|
|
require.NoError(t, err)
|
|
|
|
require.Equal(t, test.method, event.Type().String())
|
|
|
|
require.Equal(t, test.hash.StringLE(), event.ScriptHash().StringLE())
|
2021-09-13 09:02:32 +00:00
|
|
|
|
2021-11-25 16:40:33 +00:00
|
|
|
// check args parsing
|
|
|
|
bw := io.NewBufBinWriter()
|
|
|
|
emit.Array(bw.BinWriter, test.args...)
|
2021-09-13 09:02:32 +00:00
|
|
|
|
2021-11-25 16:40:33 +00:00
|
|
|
ctx := vm.NewContext(bw.Bytes())
|
2021-09-13 09:02:32 +00:00
|
|
|
|
2021-11-25 16:40:33 +00:00
|
|
|
opCode, param, err := ctx.Next()
|
|
|
|
require.NoError(t, err)
|
2021-09-13 09:02:32 +00:00
|
|
|
|
2021-11-25 16:40:33 +00:00
|
|
|
for _, opGot := range event.Params() {
|
|
|
|
require.Equal(t, opCode, opGot.code)
|
|
|
|
require.Equal(t, param, opGot.param)
|
2021-09-13 09:02:32 +00:00
|
|
|
|
2021-11-25 16:40:33 +00:00
|
|
|
opCode, param, err = ctx.Next()
|
|
|
|
require.NoError(t, err)
|
|
|
|
}
|
2021-09-13 09:02:32 +00:00
|
|
|
|
2021-11-25 16:40:33 +00:00
|
|
|
_, _, err = ctx.Next() // PACK opcode
|
|
|
|
require.NoError(t, err)
|
|
|
|
_, _, err = ctx.Next() // packing len opcode
|
|
|
|
require.NoError(t, err)
|
2021-09-13 09:02:32 +00:00
|
|
|
|
2021-11-25 16:40:33 +00:00
|
|
|
opCode, _, err = ctx.Next()
|
|
|
|
require.NoError(t, err)
|
|
|
|
require.Equal(t, opcode.RET, opCode)
|
|
|
|
}
|
2021-09-10 17:29:32 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func alphaKeysSource() client.AlphabetKeys {
|
|
|
|
return func() (keys.PublicKeys, error) {
|
|
|
|
return alphaKeys, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-02-21 11:42:45 +00:00
|
|
|
func script(hash util.Uint160, method string, args ...any) []byte {
|
2021-09-10 17:29:32 +00:00
|
|
|
bw := io.NewBufBinWriter()
|
|
|
|
|
|
|
|
if len(args) > 0 {
|
|
|
|
emit.AppCall(bw.BinWriter, hash, method, callflag.All, args)
|
|
|
|
} else {
|
|
|
|
emit.AppCallNoArgs(bw.BinWriter, hash, method, callflag.All)
|
|
|
|
}
|
|
|
|
|
|
|
|
return bw.Bytes()
|
|
|
|
}
|
|
|
|
|
2021-11-25 16:40:33 +00:00
|
|
|
func correctNR(script []byte, additionalWitness bool) *payload.P2PNotaryRequest {
|
2021-09-10 17:29:32 +00:00
|
|
|
alphaVerificationScript, _ := smartcontract.CreateMultiSigRedeemScript(len(alphaKeys)*2/3+1, alphaKeys)
|
|
|
|
|
2021-11-25 16:40:33 +00:00
|
|
|
signers := []transaction.Signer{
|
|
|
|
{},
|
|
|
|
{
|
|
|
|
Account: hash.Hash160(alphaVerificationScript),
|
|
|
|
},
|
|
|
|
{},
|
|
|
|
}
|
|
|
|
if additionalWitness { // insert on element with index 2
|
|
|
|
signers = append(signers[:2+1], signers[2:]...)
|
|
|
|
signers[2] = transaction.Signer{Account: hash.Hash160(alphaVerificationScript)}
|
|
|
|
}
|
|
|
|
|
|
|
|
scripts := []transaction.Witness{
|
|
|
|
{},
|
|
|
|
{
|
|
|
|
InvocationScript: dummyInvocationScript,
|
|
|
|
VerificationScript: alphaVerificationScript,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
InvocationScript: dummyInvocationScript,
|
|
|
|
},
|
|
|
|
}
|
|
|
|
if additionalWitness { // insert on element with index 2
|
|
|
|
scripts = append(scripts[:2+1], scripts[2:]...)
|
|
|
|
scripts[2] = transaction.Witness{
|
|
|
|
InvocationScript: dummyInvocationScript,
|
|
|
|
VerificationScript: alphaVerificationScript,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
nKeys := uint8(len(alphaKeys))
|
|
|
|
if additionalWitness {
|
|
|
|
nKeys++
|
|
|
|
}
|
|
|
|
|
2021-09-10 17:29:32 +00:00
|
|
|
return &payload.P2PNotaryRequest{
|
|
|
|
MainTransaction: &transaction.Transaction{
|
2021-11-25 16:40:33 +00:00
|
|
|
Signers: signers,
|
|
|
|
Scripts: scripts,
|
2021-09-10 17:29:32 +00:00
|
|
|
Attributes: []transaction.Attribute{
|
|
|
|
{
|
|
|
|
Value: &transaction.NotaryAssisted{
|
2021-11-25 16:40:33 +00:00
|
|
|
NKeys: nKeys,
|
2021-09-10 17:29:32 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
Script: script,
|
|
|
|
},
|
|
|
|
FallbackTransaction: &transaction.Transaction{
|
|
|
|
Attributes: []transaction.Attribute{
|
|
|
|
{},
|
|
|
|
{
|
|
|
|
Type: transaction.NotValidBeforeT,
|
|
|
|
Value: &transaction.NotValidBefore{
|
|
|
|
Height: 1000,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|