the validator checks transaction 1db6...cd51 and verifies that its input matches output 0 of transaction c660...f617
I have a block and parse it from begin to end. Some pseudocode:
const int count ( rawdata.getTxCount ( ) );
for ( int i ( 0 ); i < count; i++ )
{
const Transaction tx ( rawdata.getTransaction ( ) );
// validate and update current state
}
In fact, I definitely able to rewrite my code.
I am just wondering - what is the reason to store transactions in alphabet order of their txid?
As far as I know, the client works with UTXO database, not with serialized blocks.