maidsafe / sn_dbc

Safe Network DBCs
BSD 3-Clause "New" or "Revised" License
15 stars 16 forks source link

fix: verify that ReissueShare match #155

Closed dan-da closed 2 years ago

dan-da commented 2 years ago

We modify ReissueShare to facilitate verifying that common fields are the same between all mint nodes. (All fields except sig-share must match.)

We also remove from ReissueShare an unnecessary Vec of redundant MintNodeSignature keyed by input KeyImage. All MintNodeSignature were signing the same Tx, so only one copy is needed.

The above changes enable DbcBuilder::build() to be simplified quite a bit, and it is more correct because now it verifies that all common fields of all ReissueShare are equal.

While we are at it, we do a bit of cleanup/normalization of the API such as renaming NodeSignature to IndexedSignatureShare.