Author

Topic: CBitcoinAddress, Endianness, and Addresses. (Read 537 times)

sr. member
Activity: 287
Merit: 250
April 15, 2013, 03:21:40 PM
#3
Thanks.
hero member
Activity: 812
Merit: 1022
No Maps for These Territories
Yes, that is correct. The values on blockchain are reversed.
sr. member
Activity: 287
Merit: 250
So I'm just messing around with the Satoshi client, and this
Code:
    CBitcoinAddress myAddr = CBitcoinAddress("19t98d9GwycvrUYos8cf9k7HSUXyMFyo2z");
    CKeyID myKey;
    myAddr.GetKeyID(myKey);
    fprintf(stdout,"Key1:%s\n",myKey.GetHex().c_str());
This outputs the correct RipeMD160 that I would expect, EXCEPT it's completely reversed to what blockchain.info gives me. I'm just wondering if I use this code
Code:
CTxDestination myDest = myAddr.Get();
...
CWalletTx myTx
pwalletMain->SendMoneyToDestination(myDest,100000,myTx,true);
Will that send the bitcoins to the correct address? Is endianness all taken care of by the client?
I just want to ask somebody else's opinion before I start using this so I don't lose my coins.
Jump to: