The other day I decided to play around with Ethereum and write a simple program that will load the network with transactions as close as possible to the real environment. For these needs, I used my private Ethereum network, Go and the absolutely non-documented go-ethereum library. I understand how to create accounts, keys and transactions, but how the hell do I create a block? In RPC, you could call the miner.start (number_of_threads) method and everything worked! And now I don`t know what to do with this problem in Golang and go-ethereum. All I found its some method called "miner.New" which takes on input a bunch of weird things

func New(eth Backend, config *params.ChainConfig, mux *event.TypeMux, engine consensus.Engine, recommit time.Duration, gasFloor, gasCeil uint64, isLocalBlock func(block *types.Block) bool) *Miner
Please, if anyone knows how to do this, give a link to the snippet or at least tell which way to go to solve this problem. Thanks a lot

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.