Skip to content

fix(test): handle TxnHashNotFound in db-compat test#435

Merged
kariy merged 2 commits intomainfrom
fix/db-compat-test
Feb 25, 2026
Merged

fix(test): handle TxnHashNotFound in db-compat test#435
kariy merged 2 commits intomainfrom
fix/db-compat-test

Conversation

@kariy
Copy link
Member

@kariy kariy commented Feb 25, 2026

The db-compat test has been failing since #392 bumped bBockifier to v0.16.0-rc.0, which introduced a breaking change in TransactionExecutionInfo struct serialization.

The v1.6.0 test database contains traces in the old format that can no longer be deserialized, causing trace_transaction to return TxnHashNotFound instead of the trace data.

This updates the test to accept TxnHashNotFound as a valid (expected) outcome for that call. The provider returns None on deserialization failure as a backward-compatibility measure:

match self.0.get::<tables::TxTraces>(num) {
    Ok(Some(execution)) => Ok(Some(execution)),
    Ok(None) => Ok(None),
    // Treat decompress errors as non-existent for backward compatibility
    Err(DatabaseError::Codec(CodecError::Decompress(err))) => {
        warn!(tx_num = %num, %err, "Failed to deserialize transaction trace");
        Ok(None)
    }
    Err(e) => Err(e.into()),
}

…tion

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@kariy kariy changed the title fix(test): handle TxnHashNotFound in db-compat test fix(test): handle TxnHashNotFound in db-compat test Feb 25, 2026
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@kariy kariy merged commit affddaa into main Feb 25, 2026
1 check passed
@kariy kariy deleted the fix/db-compat-test branch February 25, 2026 22:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant