mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
remove metro
This commit is contained in:
parent
9e233ccb69
commit
b678fb4b3e
2 changed files with 0 additions and 32 deletions
|
|
@ -1699,17 +1699,6 @@ func SubmitTransaction(ctx context.Context, b Backend, tx *types.Transaction) (c
|
|||
return common.Hash{}, err
|
||||
}
|
||||
|
||||
// send to metro instead of eth mempool
|
||||
txBytes, err := tx.MarshalBinary()
|
||||
if err != nil {
|
||||
return common.Hash{}, err
|
||||
}
|
||||
|
||||
metroAPI := NewMetroAPI(b.MetroGRPCEndpoint())
|
||||
if err := metroAPI.SubmitTransaction(txBytes); err != nil {
|
||||
return common.Hash{}, err
|
||||
}
|
||||
|
||||
// Print a log with full tx details for manual investigations and interventions
|
||||
signer := types.MakeSigner(b.ChainConfig(), b.CurrentBlock().Number)
|
||||
from, err := types.Sender(signer, tx)
|
||||
|
|
|
|||
|
|
@ -1,21 +0,0 @@
|
|||
package ethapi
|
||||
|
||||
import (
|
||||
metrotx "github.com/astriaorg/metro-transactions/tx"
|
||||
"github.com/ethereum/go-ethereum/log"
|
||||
)
|
||||
|
||||
const secondaryChainID = "ethereum"
|
||||
|
||||
type MetroAPI struct {
|
||||
endpoint string
|
||||
}
|
||||
|
||||
func NewMetroAPI(endpoint string) *MetroAPI {
|
||||
log.Info("NewMetroAPI", "endpoint", endpoint)
|
||||
return &MetroAPI{endpoint: endpoint}
|
||||
}
|
||||
|
||||
func (api *MetroAPI) SubmitTransaction(tx []byte) error {
|
||||
return metrotx.BuildAndSendSecondaryTransaction(api.endpoint, secondaryChainID, tx)
|
||||
}
|
||||
Loading…
Reference in a new issue