revault / revaultd

The "wallet" daemon for participants under the Revault architecture
BSD 3-Clause "New" or "Revised" License
49 stars 21 forks source link

fix config: failed to serialize with toml #375

Closed edouardparis closed 2 years ago

edouardparis commented 2 years ago

Sorry I did not test enough the previous PR and some cases went wrong. The error from toml crate is quite hard to understand on first catch


Because all values in a TOML table must be emitted before further tables are emitted, it implies that sub structs fields must be at the end of the parent struct, otherwise toml returns the error ValueAfterTable

This commit add also some macro to noise pub key fields and duration fields that did not failed the serialization but were written in multiple fields instead of simple string.