Here is your substrate and code vision that should help you cut the scrap “The top event that Basian C Go -Terum (Geth) does not start”:
Description number
The problem is that the “Blockbymumble” method is an empty and illegal answer that can be taken to the lost. Field Transactionype does not cause detailed blocks.
Solution
In order to solve this problem, you have to a reliable factual block of fact and the idyntifical tip event that was a bass chain. You can do this by using internal leaves Geth or API Ethereum-GO-RPC.
Shag 1: Check the data block
You have to make a leaf tube from the base, use blockbympumbber with the right hash and event. Tie the valuable blocks to identify the tip event, which was a closed basket.
Here are the code primer fragments that indicate how to do:
`Go
Main package
Import (
"Kontxt"
"FMT"
"Github.com/ethereum/go-thers/v5"
In
Func Main () {
// Changing the correct Hash event and the number of your block
Blocknumbber: = 12345 // Over the actual block
Txhash: = "0x ... Event Hash ..."
ContractionAddress: = "0x ... Address Count ..."
ContractionInterface: = ContractionAddress
Eters: = & go.ethers {}
// prints a block on a block
Block, Err: = Ethers.blockbynumbber (Context.background (), Contractintermace, Txhash, 12345)
If you are horrified! = zero {
FMT.println (ERR)
Seek
}
-
_, T: = Range block.data {
If t.type == go.eth_type event {
FMT.PRINTF ("Viinteet: %s \ n", T.Valu)
}
}
}
Shag 2: Remove the correct transaction
From She 1, you should be in the state of the type of bass chain. You can use Enum Transactionype values for Go -Weweum (Geth) to stay above that the right type echoed.
For example:
`Go
Entertain GoettraSacttype Uint8
Const (
Eth_type Transactionype = ITO // 0x ... A hint ...
In
Func (t go.ettrasacttype) string () string {
Switch t {
Case eh_type:
Return the "event"
Power:
restores 'unnatural'
}
}
Shag 3: Code code

Change the method of the blockbympumber call to the right hash and event area, and from the logic of the cuts to determine the right tip of the event.
Here’s a predicted codifragment primer that makes a demonster:
`Go
Main package
Import (
"Kontxt"
"FMT"
"Github.com/ethereum/go-thers/v5"
In
Func Main () {
// Changing the correct Hash event and the number of your block
Blocknumbber: = 12345 // Over the actual block
Txhash: = "0x ... Event Hash ..."
ContractionAddress: = "0x ... Address Count ..."
Eters: = & go.ethers {}
// blasted the block with Blockbynumbber with the right Hash event and number
Block, Err: = eetters.blockbynumbber (context.background (), contractionaddress, txhash, blocknumbber)
If you are horrified! = zero {
FMT.println (ERR)
Seek
}
-
_, T: = Range block.data {
If t.type == go.eth_type event {
FMT.print
}
}
}
Next is Shague, you can grind scrap “top event” Basts C GO -Weweum (Geth).