|
|
|
|
|
by brightball
3368 days ago
|
|
Think of it this way: you have a struct type with 4 attributes that you want to pass to another function. Currently, that function declares it will match on the pattern of those 4 attributes rather than a static type. Now, you update the Node and modify the type on the sending Node to have 5 attributes. With pattern matching on the 4, everything still works. With static types on the struct the contract is now out of sync. |
|
On a suitably complex/large system this is a recipe for disaster. Things start to slowly rot. It is far better to maintain the old function, accepting the old struct, map it to the new struct and forward it on to the new function that accepts the new struct. Let the old one consume anything that's already queued, or being sent from other nodes that haven't yet been upgraded whilst the new one takes the new format.