Create a wallet as follows:

```sh
$ bitcoin-cli createwallet "watchonly" true
$ bitcoin-cli -rpcwallet=watchonly getwalletinfo
{
   ...
   "private_keys_enabled": false
}
```

The following should fail, but doesn't:

```sh
$ bitcoin-cli -rpcwallet=watchonly encryptwallet 1234
wallet encrypted; The keypool has been flushed and a new HD seed was generated (if you are using HD). You need to make a new backup.
```

It partially fails silently, because it doesn't actually add a seed. But it does ask for a password when calling `dumpwallet`, which doesn't make sense because we currently don't encrypt anything other than private keys.  
}
        if (tip_height) {
            start_block = locked_chain->getBlockHash(start_height);
            
            
            
            
            
            if (stop_height) {
                stop_block = locked_chain->getBlockHash(*stop_height);
            }
        }
    }
    CWallet::ScanResult result =
        pwallet->ScanForWalletTransactions(start_block, stop_block, reserver, true );
    switch (result.status) {
    case CWallet::ScanResult::SUCCESS:
        break;
    case CWallet::ScanResult::FAILURE:
        throw JSONRPCError(RPC_MISC_ERROR, "Rescan failed. Potentially corrupted data files.");
    case CWallet::ScanResult::USER_ABORT:
        throw JSONRPCError(RPC_MISC_ERROR, "Rescan aborted.");
        
    }
    UniValue response(UniValue::VOBJ);
    response.pushKV("start_height", start_height);
    response.pushKV("stop_height", result.last_scanned_height ? *result.last_scanned_height : UniValue());
    return response;
}
class DescribeWalletAddressVisitor : public boost::static_visitor<UniValue>