Help with sending txn on current block in polygon

hi everyone. how can I send txn on current block? I sent txn with 1000 gwei but it’s mined on next 2 block, below txn mined with “blocksPending” -1, I use server with 12ms responce time. anyone did this befor? tanx in advance

1 Like

Hi @yasin_dn and welcome to the Infura community!

Could you clarify, are you trying to send a transaction to a specific block?
Would you be able to share a code snippet where you are sending a transaction?

Hi @lovekosmas,
Yes. I want to my txn will be included to specific block.
I use below code and call it every 30ms

latestBlock = newestBlock;
newestBlock = await webWMATIC.eth.getBlockNumber();

if (newestBlock != latestBlock) {
    webWMATIC.eth.sendSignedTransaction(signedTx.rawTransaction, null)
}

as soon as I found new block I send txn, I prepare everything before to save time.
I want my txn mined on newestBlock but it mined on newestBlock+2 or +3.

p.s.
I wrote this program for eth network and it works fine but in Matic it didn’t work.
my server median response time to call method is around 13 to 15ms.

Also there are other people that have this problem but I don’t think this problem because of bor or Matic, I think something’s wrong in node or validator.
https://github.com/maticnetwork/bor/issues/141