On developing a custom geth fork there is the need to call a specific hardcoded smart contract when ETH transfer occur. This is not an Ethereum normal behaviour but a new feature we want to implement on the fork. The calling of the contract will be done inside the very transaction that triggers the whole process, so creating a new transaction to call the contract is not an option. The atomic transaction must include the internal call of the contract (this special contract will have a hardcoded address all the time).

This code seems ok to launch new transactions from goLang code, but this is not what I need. Instead, I want to call a contract method without initiating a new transaction with a new txHash, just diverting the flow of geth code to execute the method inside the very tx that is currently running, that is an internal transaction.
– Juan Ignacio Pérez SacristánMar 28 at 13:14