Skip to content

Commit

Permalink
rpc: rpc.proto. add type in account state.
Browse files Browse the repository at this point in the history
  • Loading branch information
royshang committed Mar 27, 2018
1 parent 12cd8ac commit db7c2ec
Show file tree
Hide file tree
Showing 3 changed files with 166 additions and 141 deletions.
3 changes: 2 additions & 1 deletion rpc/api_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func (s *APIService) GetAccountState(ctx context.Context, req *rpcpb.GetAccountS
}

metricsAccountStateSuccess.Mark(1)
return &rpcpb.GetAccountStateResponse{Balance: acc.Balance().String(), Nonce: acc.Nonce()}, nil
return &rpcpb.GetAccountStateResponse{Balance: acc.Balance().String(), Nonce: acc.Nonce(), Type: uint32(addr.Type())}, nil
}

// Call is the RPC API handler.
Expand Down Expand Up @@ -300,6 +300,7 @@ func (s *APIService) toBlockResponse(block *core.Block, fullFillTransaction bool
TxsRoot: block.TxsRoot().String(),
EventsRoot: block.EventsRoot().String(),
ConsensusRoot: block.ConsensusRoot(),
Miner: byteutils.Hash(block.ConsensusRoot().Proposer).Base58(),
IsFinality: isFinality,
}

Expand Down
Loading

0 comments on commit db7c2ec

Please sign in to comment.