diff options
author | Elad <theman@elad.im> | 2018-06-14 17:21:17 +0800 |
---|---|---|
committer | Felix Lange <fjl@users.noreply.github.com> | 2018-06-14 17:21:17 +0800 |
commit | 1836366ac19e30f157570e61342fae53bc6c8a57 (patch) | |
tree | a95b5027602d17315cd6462f7c08ac4123c9099d /contracts | |
parent | 591cef17d4f1700de50057fd6988b9731a2195c9 (diff) | |
download | go-tangerine-1836366ac19e30f157570e61342fae53bc6c8a57.tar go-tangerine-1836366ac19e30f157570e61342fae53bc6c8a57.tar.gz go-tangerine-1836366ac19e30f157570e61342fae53bc6c8a57.tar.bz2 go-tangerine-1836366ac19e30f157570e61342fae53bc6c8a57.tar.lz go-tangerine-1836366ac19e30f157570e61342fae53bc6c8a57.tar.xz go-tangerine-1836366ac19e30f157570e61342fae53bc6c8a57.tar.zst go-tangerine-1836366ac19e30f157570e61342fae53bc6c8a57.zip |
all: library changes for swarm-network-rewrite (#16898)
This commit adds all changes needed for the merge of swarm-network-rewrite.
The changes:
- build: increase linter timeout
- contracts/ens: export ensNode
- log: add Output method and enable fractional seconds in format
- metrics: relax test timeout
- p2p: reduced some log levels, updates to simulation packages
- rpc: increased maxClientSubscriptionBuffer to 20000
Diffstat (limited to 'contracts')
-rw-r--r-- | contracts/ens/ens.go | 6 | ||||
-rw-r--r-- | contracts/ens/ens_test.go | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/contracts/ens/ens.go b/contracts/ens/ens.go index 06045a5cd..75d9d0e4b 100644 --- a/contracts/ens/ens.go +++ b/contracts/ens/ens.go @@ -95,7 +95,7 @@ func ensParentNode(name string) (common.Hash, common.Hash) { } } -func ensNode(name string) common.Hash { +func EnsNode(name string) common.Hash { parentNode, parentLabel := ensParentNode(name) return crypto.Keccak256Hash(parentNode[:], parentLabel[:]) } @@ -136,7 +136,7 @@ func (self *ENS) getRegistrar(node [32]byte) (*contract.FIFSRegistrarSession, er // Resolve is a non-transactional call that returns the content hash associated with a name. func (self *ENS) Resolve(name string) (common.Hash, error) { - node := ensNode(name) + node := EnsNode(name) resolver, err := self.getResolver(node) if err != nil { @@ -165,7 +165,7 @@ func (self *ENS) Register(name string) (*types.Transaction, error) { // SetContentHash sets the content hash associated with a name. Only works if the caller // owns the name, and the associated resolver implements a `setContent` function. func (self *ENS) SetContentHash(name string, hash common.Hash) (*types.Transaction, error) { - node := ensNode(name) + node := EnsNode(name) resolver, err := self.getResolver(node) if err != nil { diff --git a/contracts/ens/ens_test.go b/contracts/ens/ens_test.go index 0016f47db..6ad844708 100644 --- a/contracts/ens/ens_test.go +++ b/contracts/ens/ens_test.go @@ -55,7 +55,7 @@ func TestENS(t *testing.T) { if err != nil { t.Fatalf("can't deploy resolver: %v", err) } - if _, err := ens.SetResolver(ensNode(name), resolverAddr); err != nil { + if _, err := ens.SetResolver(EnsNode(name), resolverAddr); err != nil { t.Fatalf("can't set resolver: %v", err) } contractBackend.Commit() |