From acec1b02509d2fed9499eade0354490d226ee876 Mon Sep 17 00:00:00 2001 From: Anna Shaleva Date: Wed, 6 Mar 2024 17:54:51 +0300 Subject: [PATCH] Payloads: add doc to CalculateNetworkFee method of NotaryAssisted attribute Signed-off-by: Anna Shaleva --- src/Neo/Network/P2P/Payloads/NotaryAssisted.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Neo/Network/P2P/Payloads/NotaryAssisted.cs b/src/Neo/Network/P2P/Payloads/NotaryAssisted.cs index 51ff6959dc..3ae10de198 100644 --- a/src/Neo/Network/P2P/Payloads/NotaryAssisted.cs +++ b/src/Neo/Network/P2P/Payloads/NotaryAssisted.cs @@ -55,6 +55,16 @@ public override bool Verify(DataCache snapshot, Transaction tx) return tx.Signers.Any(p => p.Account.Equals(notaryH)); } + /// + /// Calculates the network fee needed to pay for NotaryAssisted attribute. According to the + /// https://github.com/neo-project/neo/issues/1573#issuecomment-704874472, network fee consists of + /// the base Notary service fee per key multiplied by the expected number of transactions that should + /// be collected by the service to complete Notary request increased by one (for Notary node witness + /// itself). + /// + /// The snapshot used to read data. + /// The transaction to calculate. + /// The network fee of the NotaryAssisted attribute. public override long CalculateNetworkFee(DataCache snapshot, Transaction tx) { return (NKeys + 1) * base.CalculateNetworkFee(snapshot, tx);