You're not saving the wallet. Look at the examples again. You should only add the keys the first time you open the wallet, and you Sikhs save it in a file (and enable auto save). The blockchain file doesn't have the full chain, just the headers. The wallet is where related transactions are stored.