4 ms·
Seriously. I thought this bit of code from the MtGox leak was interesting. Sure looks like a potential double-spend race condition: $out = \DB::DAO('Money_
by curveship 13y ago
Seriously. I thought this bit of code from the MtGox leak was interesting. Sure looks like a potential double-spend race condition:
$out = \DB::DAO('Money_Bitcoin_Block_Tx_Out')->searchOne(array('Hash' => $bean->Hash, 'N' => $bean->N));
if ($out) {
if ($out->Claimed == 'Y') {
$bean->Available = 'N';
$bean->commit();
continue;
}
}
What if someone else claims $out between the read and commit? Is no one at BTC exchanges really asking these kinds of questions?
- deleted 13y ago[deleted]