[#383] innerring: Marshal node info back after validation
Node info validator may change node attributes, e.g. update it with human-readable location attributes based on LOCODE. So inner ring node should provide new node info binary to smart contract. Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
parent
6cb906ab5f
commit
058ab0e533
1 changed files with 8 additions and 0 deletions
|
@ -35,6 +35,14 @@ func (np *Processor) processAddPeer(node []byte) {
|
|||
return
|
||||
}
|
||||
|
||||
// marshal node info back to binary
|
||||
node, err = nodeInfo.Marshal()
|
||||
if err != nil {
|
||||
np.log.Warn("can't marshal approved network map candidate",
|
||||
zap.String("error", err.Error()))
|
||||
return
|
||||
}
|
||||
|
||||
keyString := hex.EncodeToString(nodeInfo.PublicKey())
|
||||
|
||||
exists := np.netmapSnapshot.touch(keyString, np.epochState.EpochCounter())
|
||||
|
|
Loading…
Reference in a new issue