sameWireFields function

bool sameWireFields(
  1. CachedNode prev,
  2. WireNode next
)

Whether the incoming wire node carries the same information as the cached one.

Implementation

bool sameWireFields(CachedNode prev, WireNode next) {
  final keys = <String>{};
  for (final k in prev.keys) {
    if (!kBookkeepingKeys.contains(k) && !kVolatileWireKeys.contains(k)) {
      keys.add(k);
    }
  }
  for (final k in next.keys) {
    if (!kVolatileWireKeys.contains(k)) keys.add(k);
  }
  for (final k in keys) {
    if (!deepEquals(prev[k], next[k])) return false;
  }
  return true;
}