Skip to content

Commit

Permalink
wallet : adding a verification to avoid broadcasting a forced (thus p…
Browse files Browse the repository at this point in the history
…ossibly invalid) REVEAL right away
  • Loading branch information
HDardenne committed Jan 8, 2021
1 parent 5bbbfb7 commit 222a199
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/wallet/http.js
Original file line number Diff line number Diff line change
Expand Up @@ -1074,6 +1074,7 @@ class HTTP extends Server {
const force = valid.bool('force', false);

assert(broadcast ? sign : true, 'Must sign when broadcasting.');
assert(force ? !broadcast : true, 'Must not broadcast when forcing.');
assert(force ? name : true, 'Must specify a name when forcing');

if (!name) {
Expand Down

0 comments on commit 222a199

Please sign in to comment.