mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-24 21:56:43 +00:00
rpc fixes continued
This commit is contained in:
parent
02cc702d0f
commit
8d53a2d73e
4 changed files with 11 additions and 11 deletions
|
|
@ -127,7 +127,7 @@ func (b *rpcBackend) ContractCall(contract common.Address, data []byte, pending
|
|||
if pending {
|
||||
block = "pending"
|
||||
}
|
||||
res, err := b.request("eth_call", []interface{}{args, block})
|
||||
res, err := b.request("exp_call", []interface{}{args, block})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
@ -142,7 +142,7 @@ func (b *rpcBackend) ContractCall(contract common.Address, data []byte, pending
|
|||
// PendingAccountNonce implements ContractTransactor.PendingAccountNonce, delegating
|
||||
// the current account nonce retrieval to the remote node.
|
||||
func (b *rpcBackend) PendingAccountNonce(account common.Address) (uint64, error) {
|
||||
res, err := b.request("eth_getTransactionCount", []interface{}{account.Hex(), "pending"})
|
||||
res, err := b.request("exp_getTransactionCount", []interface{}{account.Hex(), "pending"})
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
|
@ -160,7 +160,7 @@ func (b *rpcBackend) PendingAccountNonce(account common.Address) (uint64, error)
|
|||
// SuggestGasPrice implements ContractTransactor.SuggestGasPrice, delegating the
|
||||
// gas price oracle request to the remote node.
|
||||
func (b *rpcBackend) SuggestGasPrice() (*big.Int, error) {
|
||||
res, err := b.request("eth_gasPrice", nil)
|
||||
res, err := b.request("exp_gasPrice", nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
@ -191,7 +191,7 @@ func (b *rpcBackend) EstimateGasLimit(sender common.Address, contract *common.Ad
|
|||
Value: rpc.NewHexNumber(value),
|
||||
}
|
||||
// Execute the RPC call and retrieve the response
|
||||
res, err := b.request("eth_estimateGas", []interface{}{args})
|
||||
res, err := b.request("exp_estimateGas", []interface{}{args})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
@ -213,7 +213,7 @@ func (b *rpcBackend) SendTransaction(tx *types.Transaction) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
res, err := b.request("eth_sendRawTransaction", []interface{}{common.ToHex(data)})
|
||||
res, err := b.request("exp_sendRawTransaction", []interface{}{common.ToHex(data)})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -168,7 +168,7 @@ func (tx *Transaction) Size() common.StorageSize {
|
|||
// Frontier / Homestead. however, the first time called it runs
|
||||
// signature validations, so we need two versions. This makes it
|
||||
// easier to ensure backwards compatibility of things like package rpc
|
||||
// where eth_getblockbynumber uses tx.From() and needs to work for
|
||||
// where exp_getblockbynumber uses tx.From() and needs to work for
|
||||
// both txs before and after the first homestead block. Signatures
|
||||
// valid in homestead are a subset of valid ones in Frontier)
|
||||
func (tx *Transaction) From() (common.Address, error) {
|
||||
|
|
@ -186,7 +186,7 @@ func (tx *Transaction) From() (common.Address, error) {
|
|||
// Frontier / Homestead. however, the first time called it runs
|
||||
// signature validations, so we need two versions. This makes it
|
||||
// easier to ensure backwards compatibility of things like package rpc
|
||||
// where eth_getblockbynumber uses tx.From() and needs to work for
|
||||
// where exp_getblockbynumber uses tx.From() and needs to work for
|
||||
// both txs before and after the first homestead block. Signatures
|
||||
// valid in homestead are a subset of valid ones in Frontier)
|
||||
func (tx *Transaction) FromFrontier() (common.Address, error) {
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ type LogEvent struct {
|
|||
|
||||
type LogStarting struct {
|
||||
ClientString string `json:"client_impl"`
|
||||
ProtocolVersion int `json:"eth_version"`
|
||||
ProtocolVersion int `json:"exp_version"`
|
||||
LogEvent
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -32,9 +32,9 @@ import (
|
|||
const (
|
||||
jsonRPCVersion = "2.0"
|
||||
serviceMethodSeparator = "_"
|
||||
subscribeMethod = "eth_subscribe"
|
||||
unsubscribeMethod = "eth_unsubscribe"
|
||||
notificationMethod = "eth_subscription"
|
||||
subscribeMethod = "exp_subscribe"
|
||||
unsubscribeMethod = "exp_unsubscribe"
|
||||
notificationMethod = "exp_subscription"
|
||||
)
|
||||
|
||||
// JSON-RPC request
|
||||
|
|
|
|||
Loading…
Reference in a new issue