forked from TrueCloudLab/neoneo-go
transaction: allow system fee specification in NewInvocationTX
It's not possible to create any deployment TX without it.
This commit is contained in:
parent
d93499cc6f
commit
27a57e1a2d
2 changed files with 3 additions and 2 deletions
|
@ -17,12 +17,13 @@ type InvocationTX struct {
|
|||
}
|
||||
|
||||
// NewInvocationTX returns a new invocation transaction.
|
||||
func NewInvocationTX(script []byte) *Transaction {
|
||||
func NewInvocationTX(script []byte, gas util.Fixed8) *Transaction {
|
||||
return &Transaction{
|
||||
Type: InvocationType,
|
||||
Version: 1,
|
||||
Data: &InvocationTX{
|
||||
Script: script,
|
||||
Gas: gas,
|
||||
Version: 1,
|
||||
},
|
||||
Attributes: []*Attribute{},
|
||||
|
|
|
@ -98,7 +98,7 @@ func TestDecodeEncodeInvocationTX(t *testing.T) {
|
|||
|
||||
func TestNewInvocationTX(t *testing.T) {
|
||||
script := []byte{0x51}
|
||||
tx := NewInvocationTX(script)
|
||||
tx := NewInvocationTX(script, 1)
|
||||
txData := tx.Data.(*InvocationTX)
|
||||
assert.Equal(t, InvocationType, tx.Type)
|
||||
assert.Equal(t, tx.Version, txData.Version)
|
||||
|
|
Loading…
Reference in a new issue