mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-03 01:41:48 +00:00
Merge pull request #1058 from nspcc-dev/neo3/smartcontract/policy
core: add native policy contract
This commit is contained in:
commit
0fdeafb8f7
23 changed files with 1058 additions and 43 deletions
|
@ -528,12 +528,10 @@ func (c *Client) AddNetworkFee(tx *transaction.Transaction, acc *wallet.Account)
|
|||
tx.NetworkFee += netFee
|
||||
size += sizeDelta
|
||||
}
|
||||
tx.NetworkFee += util.Fixed8(int64(size) * int64(c.GetFeePerByte()))
|
||||
fee, err := c.GetFeePerByte()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
tx.NetworkFee += util.Fixed8(int64(size) * fee)
|
||||
return nil
|
||||
}
|
||||
|
||||
// GetFeePerByte returns transaction network fee per byte
|
||||
func (c *Client) GetFeePerByte() util.Fixed8 {
|
||||
// TODO: make it a part of policy contract
|
||||
return util.Fixed8(1000)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue