diff options
author | Anton Evangelatov <anton.evangelatov@gmail.com> | 2018-12-24 00:31:32 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-24 00:31:32 +0800 |
commit | 9e9fc87e70accf2b81be8772ab2ab0c914e95666 (patch) | |
tree | 410ccdefb083b08796a14ac03653a5319e9895d7 /swarm/pot | |
parent | 335760bf0674ee553f3ca65afd6f29b6557d1b55 (diff) | |
download | go-tangerine-9e9fc87e70accf2b81be8772ab2ab0c914e95666.tar go-tangerine-9e9fc87e70accf2b81be8772ab2ab0c914e95666.tar.gz go-tangerine-9e9fc87e70accf2b81be8772ab2ab0c914e95666.tar.bz2 go-tangerine-9e9fc87e70accf2b81be8772ab2ab0c914e95666.tar.lz go-tangerine-9e9fc87e70accf2b81be8772ab2ab0c914e95666.tar.xz go-tangerine-9e9fc87e70accf2b81be8772ab2ab0c914e95666.tar.zst go-tangerine-9e9fc87e70accf2b81be8772ab2ab0c914e95666.zip |
swarm: remove unused/dead code (#18351)
Diffstat (limited to 'swarm/pot')
-rw-r--r-- | swarm/pot/address.go | 4 | ||||
-rw-r--r-- | swarm/pot/pot.go | 6 |
2 files changed, 1 insertions, 9 deletions
diff --git a/swarm/pot/address.go b/swarm/pot/address.go index 728dac14e..5af3381a7 100644 --- a/swarm/pot/address.go +++ b/swarm/pot/address.go @@ -41,10 +41,6 @@ func NewAddressFromBytes(b []byte) Address { return Address(h) } -func (a Address) IsZero() bool { - return a.Bin() == zerosBin -} - func (a Address) String() string { return fmt.Sprintf("%x", a[:]) } diff --git a/swarm/pot/pot.go b/swarm/pot/pot.go index dfda84804..a71219779 100644 --- a/swarm/pot/pot.go +++ b/swarm/pot/pot.go @@ -477,7 +477,7 @@ func (t *Pot) each(f func(Val, int) bool) bool { return f(t.pin, t.po) } -// EachFrom called with (f, start) is a synchronous iterator over the elements of a Pot +// eachFrom called with (f, start) is a synchronous iterator over the elements of a Pot // within the inclusive range starting from proximity order start // the function argument is passed the value and the proximity order wrt the root pin // it does NOT include the pinned item of the root @@ -485,10 +485,6 @@ func (t *Pot) each(f func(Val, int) bool) bool { // proximity > pinnedness // the iteration ends if the function return false or there are no more elements // end of a po range can be implemented since po is passed to the function -func (t *Pot) EachFrom(f func(Val, int) bool, po int) bool { - return t.eachFrom(f, po) -} - func (t *Pot) eachFrom(f func(Val, int) bool, po int) bool { var next bool _, lim := t.getPos(po) |