none conflict

nonce conflict

When maintaining the nonce by yourself, it may cause nonce conflicts or nonce interruptions, or the transaction nonce of the account does not start counting from 0, resulting in all subsequent transactions of the account being pending, and the console window always reports a send_transcation and the like warning

Solution

1 Use the client to solve

1.1 View account nonce
1.1.1 Type txpool or txpool.content.queued in the geth window

insert image description here

insert image description here

1.1.2 Send a transaction with a specified nonce

insert image description here

web3.eth.sendTransaction({from:"发送地址",to:"接收地址",value:"转账金额",nonce:0})

Because the problem encountered here is that the nonce does not start from 0, the minimum nonce is 4, and three transactions need to be sent to specify the nonce as 0 1 2 3, and then the pending transaction can be packaged normally

2 Use Java to solve

2.1 get nonce

​ Obtain the transaction nonce of the specified account

insert image description here

2.2 Specify nonce transaction

insert image description here

Guess you like

Origin blog.csdn.net/BXQ1120/article/details/125048873