There were a few bugs bundled together in this one.
I ended up changing the peers field of ReplicationConfig to be a HashMap<String, String> (rather than HashMap<PublicKey, String>). This makes deserialization far simpler. I've added a validation method on ReplicationConfig which is run after the data is deserialized from file. The validation performs a simple check of the peer address and comprehensive checks of the public key.
I also noticed that I was erroneously overwriting the peers replication field with an empty HashMap in solar_cli/src/main.rs (woops). That's fixed now.
Addresses https://github.com/mycognosist/solar/issues/69
There were a few bugs bundled together in this one.
I ended up changing the
peers
field ofReplicationConfig
to be aHashMap<String, String>
(rather thanHashMap<PublicKey, String>
). This makes deserialization far simpler. I've added a validation method onReplicationConfig
which is run after the data is deserialized from file. The validation performs a simple check of the peer address and comprehensive checks of the public key.I also noticed that I was erroneously overwriting the peers replication field with an empty
HashMap
insolar_cli/src/main.rs
(woops). That's fixed now.