[#1151] morph/client: Cache notary transaction heights

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
Evgenii Stratonikov 2022-02-10 14:58:14 +03:00 committed by Alex Vanin
parent e0dce1043a
commit e10b8f53d6
3 changed files with 27 additions and 4 deletions

View file

@ -6,6 +6,7 @@ import (
"fmt"
"time"
lru "github.com/hashicorp/golang-lru"
"github.com/nspcc-dev/neo-go/pkg/core/native/nativenames"
"github.com/nspcc-dev/neo-go/pkg/core/native/noderoles"
"github.com/nspcc-dev/neo-go/pkg/core/transaction"
@ -42,8 +43,9 @@ type Client struct {
}
type cache struct {
nnsHash util.Uint160
groupKey *keys.PublicKey
nnsHash util.Uint160
groupKey *keys.PublicKey
txHeights *lru.Cache
}
type singleClient struct {