瀏覽代碼

尝试修复BatchCall找不到的问题

skyfffire 2 年之前
父節點
當前提交
dc6ba11ff8
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      internal/ethapi/api.go

+ 3 - 3
internal/ethapi/api.go

@@ -980,8 +980,8 @@ type BlockChainAPI struct {
 }
 
 // NewBlockChainAPI creates a new Ethereum blockchain API.
-func NewBlockChainAPI(b Backend) *BlockChainAPI {
-	return &BlockChainAPI{b}
+func NewBlockChainAPI(b Backend) *PublicBlockChainAPI {
+	return &PublicBlockChainAPI{b}
 }
 
 // BatchCall executes a series of transactions on the state of a given block as base.
@@ -991,7 +991,7 @@ func NewBlockChainAPI(b Backend) *BlockChainAPI {
 //
 // Note, this function doesn't make any changes in the state/blockchain and is
 // useful to execute and retrieve values.
-func (s *BlockChainAPI) BatchCall(ctx context.Context, config BatchCallConfig) ([]CallResult, error) {
+func (s *PublicBlockChainAPI) BatchCall(ctx context.Context, config BatchCallConfig) ([]CallResult, error) {
 	state, header, err := s.b.StateAndHeaderByNumberOrHash(ctx, config.Block)
 	if state == nil || err != nil {
 		return nil, err