mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-17 17:33:47 +00:00
p2p/enr: invalidate r.raw on Set
This commit is contained in:
parent
5c55fe723a
commit
50b3ab66b2
1 changed files with 2 additions and 0 deletions
|
|
@ -85,6 +85,7 @@ func (r *Record) Seq() uint64 {
|
|||
// sequence number.
|
||||
func (r *Record) SetSeq(s uint64) {
|
||||
r.signature = nil
|
||||
r.raw = nil
|
||||
r.seq = s
|
||||
}
|
||||
|
||||
|
|
@ -108,6 +109,7 @@ func (r *Record) Load(k Key) error {
|
|||
// It panics if the value can't be encoded.
|
||||
func (r *Record) Set(k Key) {
|
||||
r.signature = nil
|
||||
r.raw = nil
|
||||
blob, err := rlp.EncodeToBytes(k)
|
||||
if err != nil {
|
||||
panic(fmt.Errorf("enr: can't encode %s: %v", k.ENRKey(), err))
|
||||
|
|
|
|||
Loading…
Reference in a new issue