Skip to content

Commit e49a8fc

Browse files
committed
wallet-test: add more comments.
1 parent ca4d5e5 commit e49a8fc

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

lib/wallet/http.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1211,10 +1211,10 @@ class HTTP extends Server {
12111211

12121212
// TODO: Add create TX with locks for used Coins and/or
12131213
// adds to the pending list.
1214-
if (!name) {
1215-
mtx = await req.wallet.createRevealAll(options);
1216-
} else {
1214+
if (name) {
12171215
mtx = await req.wallet.createReveal(name, options);
1216+
} else {
1217+
mtx = await req.wallet.createRevealAll(options);
12181218
}
12191219

12201220
if (sign)

test/wallet-http-test.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1734,6 +1734,7 @@ describe('Wallet HTTP', function() {
17341734
checkDoubleSpends(txs);
17351735

17361736
// spend all money for now.
1737+
// Passphrase not necessary as the wallet is unlocked.
17371738
await rcwallet1.send({
17381739
subtractFee: true,
17391740
outputs: [{
@@ -1806,7 +1807,7 @@ describe('Wallet HTTP', function() {
18061807
assert.strictEqual(balance1.coin, 6);
18071808
assert.strictEqual(balance1.confirmed, HARD_FEE * 3);
18081809

1809-
// 3 bids (nothing extra)
1810+
// 6 bids (nothing extra)
18101811
assert.strictEqual(balance2.coin, 6);
18111812
assert.strictEqual(balance2.confirmed, (HARD_FEE - 1) * 6);
18121813
});
@@ -1860,11 +1861,13 @@ describe('Wallet HTTP', function() {
18601861
it('should register 3 times', async () => {
18611862
const promises = [];
18621863

1864+
// We don't have funds to fund anything.
1865+
// Add 3 coins to pay for the fees and cause
1866+
// double spend.
18631867
await fundNcoins(rcwallet1, 3, HARD_FEE);
18641868

18651869
const forMemTX = common.forEvent(node.mempool, 'tx', 3);
18661870

1867-
// We don't have funds to fund anything.
18681871
for (let i = 0; i < 3; i++) {
18691872
promises.push(rcwallet1.createUpdate({
18701873
name: NAMES[i],

0 commit comments

Comments
 (0)