Use the spent outpoint multimap to figure out which wallet transaction outputs are unspent, instead of a vfSpent array that is saved to disk.
qa/rpc-tests/wallet.sh runs a three-node -regtest network, generates a fresh blockchain, and then exercises basic wallet sending/receiving functionality using command-line RPC.