Skip to content

Commit 1cb71d5

Browse files
committed
made batch begin from 1
record dump sample
1 parent 3d91ea3 commit 1cb71d5

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
lines changed

rollup/tests/integration_tool/imports.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ func importBatch(ctx context.Context, db *gorm.DB, chks []*orm.Chunk, encChks []
165165
}
166166
}
167167

168-
var index uint64
168+
index := uint64(1)
169169
var parentHash common.Hash
170170
if last != nil {
171171
index = last.Index + 1
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
-- Create a file with INSERT statements for the specific records
2+
-- We noticed that transactions is not used within coordinator so simply
3+
-- replace it with empty record
4+
\o block_export.sql
5+
\t on
6+
\a
7+
SELECT 'INSERT INTO l2_block (number, hash, parent_hash, header, withdraw_root,
8+
state_root, tx_num, gas_used, block_timestamp, row_consumption,
9+
chunk_hash, transactions
10+
) VALUES (' ||
11+
quote_literal(number) || ', ' ||
12+
quote_literal(hash) || ', ' ||
13+
quote_literal(parent_hash) || ', ' ||
14+
quote_literal(header) || ', ' ||
15+
quote_literal(withdraw_root) || ', ' ||
16+
quote_literal(state_root) || ', ' ||
17+
quote_literal(tx_num) || ', ' ||
18+
quote_literal(gas_used) || ', ' ||
19+
quote_literal(block_timestamp) || ', ' ||
20+
quote_literal(row_consumption) || ', ' ||
21+
quote_literal(chunk_hash) || ', ' ||
22+
quote_literal(transactions) ||
23+
');'
24+
FROM l2_block
25+
WHERE number >= 16523677 and number <= 16523700
26+
ORDER BY number ASC;
27+
\t off
28+
\a
29+
\o

0 commit comments

Comments
 (0)