Skip to content

Commit

Permalink
test: Add wallet lock balance tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
nodech committed Nov 27, 2022
1 parent 874a49e commit 13e0a19
Show file tree
Hide file tree
Showing 2 changed files with 1,069 additions and 6 deletions.
10 changes: 4 additions & 6 deletions lib/wallet/txdb.js
Original file line number Diff line number Diff line change
Expand Up @@ -1705,16 +1705,15 @@ class TXDB {
case types.RENEW:
case types.TRANSFER:
case types.FINALIZE:
case types.REVOKE:
{
case types.REVOKE: {
if (height === -1)
state.ulocked(path, value);
else
state.clocked(path, value);
break;
}

case types.REDEEM: // noop: already unlocked by the BID in the input
case types.REDEEM: // noop: already unlocked by the REVEAL in the input
break;
}
}
Expand All @@ -1741,16 +1740,15 @@ class TXDB {
case types.RENEW:
case types.TRANSFER:
case types.FINALIZE:
case types.REVOKE:
{
case types.REVOKE: {
if (height === -1)
state.ulocked(path, -value);
else
state.clocked(path, -value);
break;
}

case types.REDEEM: // noop: already unlocked by the BID in the input
case types.REDEEM: // noop: already unlocked by the REVEAL in the input
break;
}
}
Expand Down
Loading

0 comments on commit 13e0a19

Please sign in to comment.