rpc: drop getaccountstate method

It's not relevant for Neo 3.
This commit is contained in:
Roman Khimov 2020-06-02 00:26:37 +03:00
parent 657bb7575e
commit c6ae954e4e
8 changed files with 9 additions and 161 deletions

View file

@ -79,7 +79,6 @@ const (
)
var rpcHandlers = map[string]func(*Server, request.Params) (interface{}, *response.Error){
"getaccountstate": (*Server).getAccountState,
"getapplicationlog": (*Server).getApplicationLog,
"getbestblockhash": (*Server).getBestBlockHash,
"getblock": (*Server).getBlock,
@ -742,26 +741,6 @@ func (s *Server) getContractState(reqParams request.Params) (interface{}, *respo
return results, nil
}
// getAccountState returns account state.
func (s *Server) getAccountState(ps request.Params) (interface{}, *response.Error) {
var resultsErr *response.Error
var results interface{}
param, ok := ps.ValueWithType(0, request.StringT)
if !ok {
return nil, response.ErrInvalidParams
} else if scriptHash, err := param.GetUint160FromAddress(); err != nil {
return nil, response.ErrInvalidParams
} else {
as := s.chain.GetAccountState(scriptHash)
if as == nil {
as = state.NewAccount(scriptHash)
}
results = result.NewAccountState(as)
}
return results, resultsErr
}
// getBlockSysFee returns the system fees of the block, based on the specified index.
func (s *Server) getBlockSysFee(reqParams request.Params) (interface{}, *response.Error) {
param, ok := reqParams.ValueWithType(0, request.NumberT)