native: introduce attribute pricing

Port the https://github.com/neo-project/neo/pull/2916.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
This commit is contained in:
Anna Shaleva 2023-09-20 16:33:04 +03:00
parent 80fcf81102
commit 82cb2e718d
17 changed files with 356 additions and 22 deletions

View file

@ -305,7 +305,7 @@ func AddNetworkFee(bc *core.Blockchain, tx *transaction.Transaction, signers ...
tx.NetworkFee += netFee
size += sizeDelta
}
tx.NetworkFee += int64(size) * bc.FeePerByte()
tx.NetworkFee += int64(size)*bc.FeePerByte() + bc.CalculateAttributesFee(tx)
}
// NewUnsignedBlock creates a new unsigned block from txs.