I'm having a little problem, and I was hoping someone more knowledgeable might be able to give me a hand with it. See, a while back, I bought some bitcoins (some for myself, some for two friends - we'll call them A and B) and had them sent to my address.
I have a Mac, and keep my wallet on an encrypted portion of my HD as recommended on the bitcoin wiki. Because writing to the encrypted part is extremely slow, I had to download the blockchain manually and put the file in there and then start with -rescan. Then I was able to see the bitcoins that had been sent to me, and all was well for a time.
Since then, I have renamed the wallet.dat in order to force my client to generate a new wallet file for me to use. I needed two wallets because I wanted to keep A's bitcoins in a separate place from mine (he's asked me to hold on to them for a bit), but when I tried to send the bitcoins to the wallet I'd created for him (essentially, sending them to myself) it listed my transaction as 0/unconfirmed. It's been almost two months, and that hasn't changed. Looking at block explorer, the transaction never seems to have gotten into the block chain - but the balance on my computer includes the credit for the "sent" bitcoins.
Then, more recently, B asked me for his bitcoins, and I tried to send them to the address he gave me. It also listed that transaction as 0/unconfirmed, and that transaction also doesn't show up in block explorer... and it's been about two weeks since I sent it. So, the money isn't with them, or even in the blockchain... but it's also not with me. I don't know how to persuade my wallet that the transaction it sent should be undone, either.
I have a backup of my wallet file from before I sent B's transaction, but not before I sent A's, and loading that backup shows my transaction history as it was before I ever sent to B. This is good, but it sounds like I'd also need a backup from before I sent to A in order to recover all the bitcoins.
So I come to you, wise forum, for help. How do I recover the bitcoins that are neither here nor there? And if it's not too much to ask, why might the bitcoins I send get stuck? Thank you!