core: redefine opcode prices

Prices are defined in as a coefficients to `BaseExecFee` which
is defined by Policy contract (TBD later).
Native method prices are defined without need to multiply.
This commit is contained in:
Evgenii Stratonikov 2020-12-11 15:22:49 +03:00
parent 44b4c92992
commit 1840c1c80d
22 changed files with 342 additions and 298 deletions

View file

@ -1003,7 +1003,7 @@ func testRPCProtocol(t *testing.T, doRPCCall func(string, string, *testing.T) []
addNetworkFee := func(tx *transaction.Transaction) {
size := io.GetVarSize(tx)
netFee, sizeDelta := fee.Calculate(acc0.Contract.Script)
netFee, sizeDelta := fee.Calculate(chain.GetBaseExecFee(), acc0.Contract.Script)
tx.NetworkFee += netFee
size += sizeDelta
tx.NetworkFee += int64(size) * chain.FeePerByte()