nodesEqual compares two proto.Node messages, ignoring the AsOf timestamp which changes on every node build even when nothing else has changed.
(a, b *proto.Node)
| 675 | // timestamp which changes on every node build even when nothing else |
| 676 | // has changed. |
| 677 | func nodesEqual(a, b *proto.Node) bool { |
| 678 | if a == nil || b == nil { |
| 679 | return a == b |
| 680 | } |
| 681 | //nolint:forcetypeassert |
| 682 | aClone, bClone := gProto.Clone(a).(*proto.Node), gProto.Clone(b).(*proto.Node) |
| 683 | aClone.AsOf = nil |
| 684 | bClone.AsOf = nil |
| 685 | return gProto.Equal(aClone, bClone) |
| 686 | } |
| 687 | |
| 688 | // retrieveBinding gets the latest binding for a key. |
| 689 | func (b *binder) retrieveBinding(bk bKey) binding { |