Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Close statements #38

Merged
merged 1 commit into from
Jun 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions persist/sqlite/consensus.go
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ func addTransactions(tx *txn, bid types.BlockID, txns []types.Transaction, scDBI
if err != nil {
return nil, fmt.Errorf("failed to prepare check transaction statement: %v", err)
}
defer checkTransactionStmt.Close()

insertTransactionStmt, err := tx.Prepare(`INSERT INTO transactions (transaction_id) VALUES (?)`)
if err != nil {
Expand Down Expand Up @@ -747,6 +748,7 @@ func addFileContractElements(tx *txn, b types.Block, fces []explorer.FileContrac
if err != nil {
return nil, fmt.Errorf("addFileContractElements: failed to prepare last_contract_revision statement: %w", err)
}
defer revisionStmt.Close()

fcDBIds := make(map[explorer.DBFileContract]int64)
addFC := func(fcID types.FileContractID, leafIndex uint64, fc types.FileContract, resolved, valid, lastRevision bool) error {
Expand Down
Loading