rpcclient/actor: Document RPCActor.CalculateNetworkFee method

`Actor.MakeUnsignedUncheckedRun` method imposes restriction to
`CalculateNetworkFee` method's implementations: `Hash` or `Size` methods
must not be called on the pointer to the given transaction.

Add docs to adjust described requirement.

Signed-off-by: Leonard Lyubich <ctulhurider@gmail.com>
This commit is contained in:
Leonard Lyubich 2023-01-17 21:28:20 +03:00
parent 8c8c8d1bb1
commit cbdc6ba469

View file

@ -26,6 +26,10 @@ import (
type RPCActor interface {
invoker.RPCInvoke
// CalculateNetworkFee calculates network fee for the given transaction.
//
// CalculateNetworkFee MUST NOT call state-changing methods (like Hash or Size)
// of the transaction through the passed pointer: make a copy if necessary.
CalculateNetworkFee(tx *transaction.Transaction) (int64, error)
GetBlockCount() (uint32, error)
GetVersion() (*result.Version, error)