diff --git a/config/mainnet.yaml b/config/mainnet.yaml index a85712e..bd691c5 100644 --- a/config/mainnet.yaml +++ b/config/mainnet.yaml @@ -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' } diff --git a/config/testnet.yaml b/config/testnet.yaml index ef65a1e..9509ff3 100644 --- a/config/testnet.yaml +++ b/config/testnet.yaml @@ -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' } diff --git a/src/controller/update.ts b/src/controller/update.ts index 7c9fdb6..b15509a 100644 --- a/src/controller/update.ts +++ b/src/controller/update.ts @@ -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.')