Skip to content

Commit 561c7f4

Browse files
committed
fix bug and format config.json
1 parent 1f28139 commit 561c7f4

File tree

3 files changed

+54
-53
lines changed

3 files changed

+54
-53
lines changed

bridge/config.json

Lines changed: 51 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,53 @@
11
{
2-
"l1_config": {
3-
"confirmations": 6,
4-
"chain_id": 4,
5-
"endpoint": "https://goerli.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161",
6-
"l1_messenger_address": "0x0000000000000000000000000000000000000000",
7-
"start_height": 0,
8-
"relayer_config": {
9-
"messenger_contract_address": "0x0000000000000000000000000000000000000000",
10-
"sender_config": {
11-
"endpoint": "/var/lib/jenkins/workspace/SequencerPipeline/MyPrivateNetwork/geth.ipc",
12-
"check_pending_time": 3,
13-
"escalate_blocks": 100,
14-
"confirmations": 1,
15-
"escalate_multiple_num": 11,
16-
"escalate_multiple_den": 10,
17-
"max_gas_price": 10000000000,
18-
"tx_type": "AccessListTx"
19-
},
20-
"private_key": "abc123abc123abc123abc123abc123abc123abc123abc123abc123abc123abc1"
21-
}
22-
},
23-
"l2_config": {
24-
"confirmations": 1,
25-
"chain_id": 53077,
26-
"proof_generation_freq": 1,
27-
"skipped_opcodes": [
28-
"CREATE2",
29-
"DELEGATECALL"
30-
],
31-
"endpoint": "/var/lib/jenkins/workspace/SequencerPipeline/MyPrivateNetwork/geth.ipc",
32-
"l2_messenger_address": "0x0000000000000000000000000000000000000000",
33-
"relayer_config": {
34-
"messenger_contract_address": "0x0000000000000000000000000000000000000000",
35-
"rollup_contract_address": "0x0000000000000000000000000000000000000000",
36-
"sender_config": {
37-
"endpoint": "https://goerli.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161",
38-
"check_pending_time": 10,
39-
"escalate_blocks": 100,
40-
"confirmations": 6,
41-
"escalate_multiple_num": 11,
42-
"escalate_multiple_den": 10,
43-
"max_gas_price": 10000000000,
44-
"tx_type": "DynamicFeeTx"
45-
},
46-
"private_key": "1212121212121212121212121212121212121212121212121212121212121212"
47-
}
48-
},
49-
"db_config": {
50-
"driver_name": "postgres",
51-
"dsn": "postgres://admin:123456@localhost/test?sslmode=disable"
2+
"l1_config": {
3+
"confirmations": 6,
4+
"chain_id": 4,
5+
"endpoint": "https://goerli.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161",
6+
"l1_messenger_address": "0x0000000000000000000000000000000000000000",
7+
"start_height": 0,
8+
"relayer_config": {
9+
"messenger_contract_address": "0x0000000000000000000000000000000000000000",
10+
"sender_config": {
11+
"endpoint": "/var/lib/jenkins/workspace/SequencerPipeline/MyPrivateNetwork/geth.ipc",
12+
"check_pending_time": 3,
13+
"escalate_blocks": 100,
14+
"confirmations": 1,
15+
"escalate_multiple_num": 11,
16+
"escalate_multiple_den": 10,
17+
"max_gas_price": 10000000000,
18+
"tx_type": "AccessListTx"
19+
},
20+
"private_key": "abc123abc123abc123abc123abc123abc123abc123abc123abc123abc123abc1"
5221
}
53-
}
22+
},
23+
"l2_config": {
24+
"confirmations": 1,
25+
"chain_id": 53077,
26+
"proof_generation_freq": 1,
27+
"skipped_opcodes": [
28+
"CREATE2",
29+
"DELEGATECALL"
30+
],
31+
"endpoint": "/var/lib/jenkins/workspace/SequencerPipeline/MyPrivateNetwork/geth.ipc",
32+
"l2_messenger_address": "0x0000000000000000000000000000000000000000",
33+
"relayer_config": {
34+
"messenger_contract_address": "0x0000000000000000000000000000000000000000",
35+
"rollup_contract_address": "0x0000000000000000000000000000000000000000",
36+
"sender_config": {
37+
"endpoint": "https://goerli.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161",
38+
"check_pending_time": 10,
39+
"escalate_blocks": 100,
40+
"confirmations": 6,
41+
"escalate_multiple_num": 11,
42+
"escalate_multiple_den": 10,
43+
"max_gas_price": 10000000000,
44+
"tx_type": "DynamicFeeTx"
45+
},
46+
"private_key": "1212121212121212121212121212121212121212121212121212121212121212"
47+
}
48+
},
49+
"db_config": {
50+
"driver_name": "postgres",
51+
"dsn": "postgres://admin:123456@localhost/test?sslmode=disable"
52+
}
53+
}

coordinator/manager_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,14 @@ import (
1414
"github.com/scroll-tech/go-ethereum/core/types"
1515
"github.com/stretchr/testify/assert"
1616

17-
"scroll-tech/bridge/mock"
1817
"scroll-tech/common/docker"
1918
"scroll-tech/common/message"
2019
"scroll-tech/common/utils"
2120
db_config "scroll-tech/database"
2221
"scroll-tech/database/orm"
2322

23+
"scroll-tech/bridge/mock"
24+
2425
"scroll-tech/coordinator"
2526
"scroll-tech/coordinator/config"
2627
)

database/orm/layer2_message.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ func (m *layer2MessageOrm) UpdateLayer2StatusAndLayer1Hash(ctx context.Context,
192192
func (m *layer2MessageOrm) GetLayer2LatestWatchedHeight() (int64, error) {
193193
// @note It's not correct, since we may don't have message in some blocks.
194194
// But it will only be called at start, some redundancy is acceptable.
195-
row := m.db.QueryRow("SELECT MAX(height) FROM layer2_message;")
195+
row := m.db.QueryRow("SELECT COALESCE(MAX(height), -1) FROM layer2_message;")
196196

197197
var height int64
198198
if err := row.Scan(&height); err != nil {

0 commit comments

Comments
 (0)