Skip to content

[P1-M04] Refactor registry to prevent multiple address registration during inital contract registration#1194

Merged
chrismaree merged 2 commits intomasterfrom
registry-prevent-double-registration
Apr 10, 2020
Merged

[P1-M04] Refactor registry to prevent multiple address registration during inital contract registration#1194
chrismaree merged 2 commits intomasterfrom
registry-prevent-double-registration

Conversation

@chrismaree
Copy link
Copy Markdown
Member

@chrismaree chrismaree commented Apr 9, 2020

This PR prevents one address being registered multiple times in the Registry upon calling registerContract. This change prevents the Registry from ending in an inconsistent state as a result of one address being registered multiple times as a party for one contract address.

The registerContract function now behaves more like addPartyToContract which previously enforced this check that an address cant be added multiple times.

close #1195

Signed-off-by: Christopher Maree <christopher.maree@gmail.com>
Signed-off-by: Christopher Maree <christopher.maree@gmail.com>
@chrismaree chrismaree marked this pull request as ready for review April 9, 2020 09:29
@chrismaree chrismaree changed the title [M04] Financial contract registration with repeated parties might lead to inconsistent behaviors [M04] Refactor registry to prevent multiple address registration during inital contract registration Apr 9, 2020
@mrice32 mrice32 added the audit-fix-phase1 Fixes for Phase 1 (DVM) of the OZ audit label Apr 9, 2020
@mrice32 mrice32 changed the title [M04] Refactor registry to prevent multiple address registration during inital contract registration [P1-M04] Refactor registry to prevent multiple address registration during inital contract registration Apr 9, 2020
Copy link
Copy Markdown
Member

@nicholaspai nicholaspai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Copy Markdown
Member

@mrice32 mrice32 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@chrismaree chrismaree merged commit 766b345 into master Apr 10, 2020
@chrismaree chrismaree deleted the registry-prevent-double-registration branch April 10, 2020 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

audit-fix-phase1 Fixes for Phase 1 (DVM) of the OZ audit

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Financial contract registration with repeated parties might lead to inconsistent behaviors

3 participants