Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
linkdesu committed Jun 26, 2024
2 parents eb44880 + 9d3329a commit 2e5c4b9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
5 changes: 0 additions & 5 deletions config/mainnet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@ CkbOfficialNodeRpc: 'http://127.0.0.1:8114'

Env: mainnet

# Transaction fee used for creating and updating cells.
Fee:
create: 30000
update: 30000

CellDeps:
# index-state-cell-type
- outPoint: { txHash: '0xe9116d651c371662b6e29e2102422e23f90656b8619df82c48b782ff4db43a37', index: '0x0' }
Expand Down
5 changes: 0 additions & 5 deletions config/testnet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@ CkbOfficialNodeRpc: 'http://127.0.0.1:8224'

Env: testnet

# Transaction fee used for creating and updating cells.
Fee:
create: 30000
update: 30000

CellDeps:
# index-state-cell-type
- outPoint: { txHash: '0x654f8a271dde2d99f548ff5b9369a55c0cfbe19a315efb5dacf34f72d7f3ea64', index: '0x0' }
Expand Down
7 changes: 6 additions & 1 deletion src/controller/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -277,12 +277,17 @@ export async function updateController (argv: Arguments<{ type: string }>) {
try {
const data = JSON.parse(err.message)
switch (data.code) {
case -301:
case -302:
case -1107:
// These error are caused by cell occupation, could retry automatically.
logger.warn(`Update cell failed.(${data.code}: ${data.message})`, { cell_data: cellData, tx_hash: txHash, waited_blocks: waitedBlocks })
return
case -301:
// Suppress the occupation error
return
case -1111:
// Suppress the RBF rejection error
return
default:
logger.error(`Update cell failed.(${data.code}: ${data.message})`, { cell_data: cellData, tx_hash: txHash, waited_blocks: waitedBlocks })
await notifyWithThrottle(logger, 'update-error', TIME_1_M * 10, `Update cell failed.(${data.message})`, 'Try to find out what the error message means.')
Expand Down

0 comments on commit 2e5c4b9

Please sign in to comment.