It's necessary for a delegate's references to be present, e.g. verification, calculating of canonical data, etc. To ensure that a user does not get themselves into a state where they have added a delegate without their references, prevent adding a delegate to the identity document if their `rad/sigrefs` is not present. As well as this, it ensures that if there is a `rad/sigrefs` that it has the default branch -- since it's possible for a peer to have created `rad/sigrefs` through COBs without a default branch. This change meant that the `rad-id` tests required the test scenarios to be set up with all nodes having each other's references. A test case to add a missing delegate was also added to `rad-id.md`. Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com> X-Clacks-Overhead: GNU Terry Pratchett |
||
|---|---|---|
| .. | ||
| data | ||
| commands.rs | ||