Page MenuHomePhabricator

[backport] Reject invalid wallets
ClosedPublic

Authored by schancel on Jan 20 2018, 06:27.

Details

Summary

Backport of Bitcoin Core PR#10885: Reject invalid wallets

d84e78e [wallet] Specify wallet name in wallet loading errors (John Newbery)
a6da027 Reject invalid wallet files (João Barbosa)
3ef77a0 Reject duplicate wallet filenames (João Barbosa)

Pull request description:

This PR prevents loading the same wallet more than once in a multi wallet scenario. It also prevents loading with invalid files: non regular files or symlinks.

Depends on D987
Closes T190

Test Plan

make check && ./test/functional/test_runner.py

Diff Detail

Repository
rABC Bitcoin ABC
Branch
depends-on-D987
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 1688
Build 1688: arc lint + arc unit

Event Timeline

schancel created this revision.Jan 20 2018, 06:27
Herald added a reviewer: Restricted Project. · View Herald TranscriptJan 20 2018, 06:27
schancel retitled this revision from Reject invalid wallets to [backpor] Reject invalid wallets.Jan 20 2018, 06:28
schancel edited the test plan for this revision. (Show Details)
schancel edited the summary of this revision. (Show Details)Jan 20 2018, 06:32
schancel retitled this revision from [backpor] Reject invalid wallets to [backport] Reject invalid wallets.
schancel updated this revision to Diff 2626.Jan 21 2018, 02:18

Fix a few problems

matiu requested changes to this revision.Jan 21 2018, 14:36
matiu added inline comments.
test/functional/test_framework/test_framework.py
39

This is already at line 37.

This revision now requires changes to proceed.Jan 21 2018, 14:36
schancel updated this revision to Diff 2649.Jan 21 2018, 19:54

Remove extra start_node

schancel updated this revision to Diff 2650.Jan 21 2018, 19:56

Remove changes to test_framework

schancel added inline comments.Jan 22 2018, 16:06
src/wallet/wallet.cpp
529 ↗(On Diff #2657)

Should be fs::

deadalnix accepted this revision.Jan 22 2018, 16:22
deadalnix added inline comments.
src/wallet/wallet.cpp
529 ↗(On Diff #2657)

Yes please.

schancel updated this revision to Diff 2679.Jan 22 2018, 19:05

boost::filesystem:: -> fs::

schancel edited the summary of this revision. (Show Details)Jan 22 2018, 19:06
matiu resigned from this revision.Jan 23 2018, 00:09
This revision is now accepted and ready to land.Jan 23 2018, 00:09
This revision was automatically updated to reflect the committed changes.