mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-25 21:17:16 +00:00
1dcc2b141a
* share config object * create default config and logger * move db connection to common func * move server start to cli package * clear * clear * rename cli to rpc * use unified SetupLogger func * make all root flag persistent * use common flags in different packages * use common flags in different packages * move TraceTx method to eth package * use native slice flags * create package "turbo" * disable geth api * disable geth api * move more data types to turbo/adapter package * add support for customApiList * run more * run more * run more * dog-food * move DoCall * move DoCall * fix tests * fix test
51 lines
1.1 KiB
Go
51 lines
1.1 KiB
Go
package ethapi
|
|
|
|
// This file stores proxy-objects for `internal` package
|
|
import (
|
|
"github.com/ledgerwatch/turbo-geth/core"
|
|
"github.com/ledgerwatch/turbo-geth/core/types"
|
|
"github.com/ledgerwatch/turbo-geth/internal/ethapi"
|
|
)
|
|
|
|
// This package provides copy-paste and proxy objects to "internal/ethapi" package
|
|
|
|
func NewRevertError(result *core.ExecutionResult) *RevertError {
|
|
return &RevertError{ethapi.NewRevertError(result)}
|
|
}
|
|
|
|
type RevertError struct {
|
|
*ethapi.RevertError
|
|
}
|
|
|
|
type CallArgs struct {
|
|
*ethapi.CallArgs
|
|
}
|
|
|
|
type ExecutionResult struct {
|
|
*ethapi.ExecutionResult
|
|
}
|
|
|
|
//nolint
|
|
func RPCMarshalHeader(head *types.Header) map[string]interface{} {
|
|
return ethapi.RPCMarshalHeader(head)
|
|
}
|
|
|
|
//nolint
|
|
func RPCMarshalBlock(b *types.Block, inclTx bool, fullTx bool, additional map[string]interface{}) (map[string]interface{}, error) {
|
|
fields, err := ethapi.RPCMarshalBlock(b, inclTx, fullTx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
for k, v := range additional {
|
|
fields[k] = v
|
|
}
|
|
|
|
return fields, err
|
|
}
|
|
|
|
//nolint
|
|
type RPCTransaction struct {
|
|
*ethapi.RPCTransaction
|
|
}
|