brave-browser#60897 UpdateSubtreeRoots stores the block hash as root_hash, and its upsert fallback is dead
State: open · created · updated · discovered via search:lightwalletd, search:orchard wallet, search:zcash · matched body:zcash_decoder
bug feature/web3/wallet
components/brave_wallet/browser/internal/orchard_storage/orchard_storage.cc:1013 SubtreeRoot has separate root_hash and complete_block_hash fields (zcash_decoder.mojom:77-81). UpdateSubtreeRoots size-checks and binds complete_block_hash into the shard_tree.root_hash column for both the INSERT and the UPDATE, and roots[i]->root_hash is never used. The conflict fallback compares database_.GetErrorCode() with 19, but sql::Database opens with SQLITE_OPEN_EXRESCODE and…