Great! How does it work without downloading blocks ?
fingster may have to correct me, but it looks like it does download blocks. However, instead of retaining the full block database like the normal client, it retains only the wallet database, including transactions on associated addresses, and discards everything else.
Edit: Never mind, I don't have a clue. So what's "txwithtime" ?
It's an impressive reduction of the Satoshi client by any measure.
It's really exciting to know someone reading my source code. Thanks, samr7.
A block contains several transactions. Few of them involve your wallet, which are useless in the view of an individual peer. As a "selfish" client, BTC Express downloads transactions involving its own wallet but not any full block/header (even the block which contains its transactions). The server, which BTC Express connects to, stores everything as a normal peer. When BTC Express queries the server, what transactions have been done on an addresses in its client wallet, the server will send transactions involving that address by a batch of commands "txwithtime".
"txwithtime", means a transaction with its block time (the born time of the block containing the transaction). BTC Express uses the transaction's blocktime as its time and received time.
After that, BTC Express sees the global state of bitcoin network as the server does. And BTC Express can spend btc coins in its wallet immediately as a normal peer after downloading all of the blocks.
When a normal peer starts, it loads block indexes, peer addresses and wallet into its memory. The full block indexes cost lots of memory and loading time. BTC Express only need to load wallet, so it starts in seconds and costs much lower memory.
BTC Express doesn't broadcast its network address to the bitcoin network, in order to save network traffic amount for the mobile devices.