gcash / bchwallet

A secure bitcoin cash wallet daemon written in Go (golang)
ISC License
43 stars 29 forks source link

panic: Unable to synchronize wallet to chain: unable to perform wallet recovery: -5: The CF index must be enabled for this command #60

Closed cacaosteve closed 3 years ago

cacaosteve commented 4 years ago

bchd version 0.16.0 bchwallet version 0.8.2 bchctl version 0.16.0

bcdd.conf fastsync=1 prune=1 prunedepth=288

Steps:

  1. bchd createnewaccount account12
  2. bchctl getnewaddress account12
  3. send BCH to this new addresses
  4. bchctl getbalance account12 1 0
  5. Then sometime after that bchwallet closes down and can't reopen.

2020-05-02 10:39:05.506 [INF] WLLT: Opened wallet 2020-05-02 10:40:14.831 [ERR] WLLT: Cannot fetch new account properties for notification after account creation: address manager is locked 2020-05-02 10:40:31.494 [INF] WLLT: The wallet has been temporarily unlocked 2020-05-02 11:00:33.654 [ERR] CHNS: Websocket receive error from localhost:18334: websocket: close 1006 unexpected EOF 2020-05-02 11:00:33.657 [INF] CHNS: Failed to connect to localhost:18334: dial tcp 127.0.0.1:18334: connect: connection refused 2020-05-02 11:00:33.657 [INF] CHNS: Retrying connection to localhost:18334 in 5s ^X^C2020-05-02 11:00:36.255 [INF] BCHW: Received signal (interrupt). Shutting down... 2020-05-02 11:00:36.255 [WRN] BCHW: Stopping legacy RPC server... 2020-05-02 11:00:38.658 [INF] BCHW: Legacy RPC server shutdown 2020-05-02 11:00:38.658 [INF] BCHW: Shutdown complete steve@MacBook-Pro ~ % bchwallet 2020-05-02 11:02:35.158 [INF] BCHW: Version 0.8.2 2020-05-02 11:02:35.168 [INF] RPCS: Listening on 127.0.0.1:8332 2020-05-02 11:02:35.168 [INF] BCHW: Attempting RPC client connection to localhost:8334 2020-05-02 11:02:35.200 [INF] CHNS: Established connection to RPC server localhost:8334 2020-05-02 11:02:35.913 [INF] WLLT: Opened wallet 2020-05-02 11:02:36.947 [INF] WLLT: RECOVERY MODE ENABLED -- rescanning for used addresses with recovery_window=250 2020-05-02 11:02:38.692 [INF] WLLT: Seed birthday surpassed, starting recovery of wallet from height=632985 hash=000000000000000004859ebde01898003052ccf27f9a97a3204cff1048d7389e with recovery-window=250 2020-05-02 11:02:38.693 [INF] WLLT: Scanning 10 blocks for recoverable addresses 2020-05-02 11:02:38.833 [ERR] CHNS: Websocket receive error from localhost:8334: websocket: close 1006 unexpected EOF

steve@MacBook-Pro ~ % bchwallet 2020-05-02 12:37:04.384 [INF] BCHW: Version 0.8.2 2020-05-02 12:37:04.394 [INF] RPCS: Listening on 127.0.0.1:8332 2020-05-02 12:37:04.394 [INF] BCHW: Attempting RPC client connection to localhost:8334 2020-05-02 12:37:04.425 [INF] CHNS: Established connection to RPC server localhost:8334 2020-05-02 12:37:05.092 [INF] WLLT: Opened wallet 2020-05-02 12:37:06.099 [INF] WLLT: RECOVERY MODE ENABLED -- rescanning for used addresses with recovery_window=250 2020-05-02 12:37:07.816 [INF] WLLT: Seed birthday surpassed, starting recovery of wallet from height=633121 hash=0000000000000000026c46e5090930c04822dad511f1342b96fba93b4d508a0e with recovery-window=250 2020-05-02 12:37:07.818 [INF] WLLT: Scanning 10 blocks for recoverable addresses panic: Unable to synchronize wallet to chain: unable to perform wallet recovery: -5: The bchd version 0.16.0 must be enabled for this command

goroutine 40 [running]: github.com/gcash/bchwallet/wallet.(Wallet).handleChainNotifications(0xc000503380) /Users/steve/bchwallet/wallet/chainntfns.go:117 +0x13f3 created by github.com/gcash/bchwallet/wallet.(Wallet).SynchronizeRPC /Users/steve/bchwallet/wallet/wallet.go:222 +0x1aa

zquestz commented 4 years ago

CF index is required for many commands, and is not possible with fastsync currently. You would need to disable fastsync and reindex the chain with bchd, ideally with -txindex and -addrindex.