cli/vm: use tx system fee by default
This commit is contained in:
parent
2908965a8d
commit
286f40b828
1 changed files with 7 additions and 1 deletions
|
@ -205,7 +205,10 @@ Example:
|
||||||
UsageText: `loadtx [--historic <height>] [--gas <int>] <file-or-hash>`,
|
UsageText: `loadtx [--historic <height>] [--gas <int>] <file-or-hash>`,
|
||||||
Flags: []cli.Flag{historicFlag, gasFlag},
|
Flags: []cli.Flag{historicFlag, gasFlag},
|
||||||
Description: `Load transaction into the VM from chain or from parameter context file.
|
Description: `Load transaction into the VM from chain or from parameter context file.
|
||||||
The transaction script will be loaded into VM; the resulting execution context will use the provided transaction as script container including its signers, hash and nonce.
|
The transaction script will be loaded into VM; the resulting execution context
|
||||||
|
will use the provided transaction as script container including its signers,
|
||||||
|
hash and nonce. It'll also use transaction's system fee value as GAS limit if
|
||||||
|
--gas option is not used.
|
||||||
|
|
||||||
<file-or-hash> is mandatory parameter.
|
<file-or-hash> is mandatory parameter.
|
||||||
|
|
||||||
|
@ -829,6 +832,9 @@ func handleLoadTx(c *cli.Context) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
v := getVMFromContext(c.App)
|
v := getVMFromContext(c.App)
|
||||||
|
if v.GasLimit == -1 {
|
||||||
|
v.GasLimit = tx.SystemFee
|
||||||
|
}
|
||||||
fmt.Fprintf(c.App.Writer, "READY: loaded %d instructions\n", v.Context().LenInstr())
|
fmt.Fprintf(c.App.Writer, "READY: loaded %d instructions\n", v.Context().LenInstr())
|
||||||
changePrompt(c.App)
|
changePrompt(c.App)
|
||||||
return nil
|
return nil
|
||||||
|
|
Loading…
Reference in a new issue