added DumpStorage RPC command

This commit is contained in:
Jae Kwon 2015-03-31 14:08:21 -07:00 committed by Ethan Buchman
parent dd1181f0d4
commit 37177fb061
1 changed files with 0 additions and 8 deletions

View File

@ -43,14 +43,6 @@ func ListAccounts() (*ResponseListAccounts, error) {
return &ResponseListAccounts{blockHeight, accounts}, nil return &ResponseListAccounts{blockHeight, accounts}, nil
} }
func GetStorage(address, storage []byte) (*ResponseGetStorage, error) {
cache := mempoolReactor.Mempool.GetCache()
addr, slot := RightPadWord256(address), RightPadWord256(storage)
value := cache.GetStorage(addr, slot)
fmt.Printf("STORAGE: %x, %x, %x\n", addr, slot, value)
return &ResponseGetStorage{storage, value.Bytes()}, nil
}
func DumpStorage(addr []byte) (*ResponseDumpStorage, error) { func DumpStorage(addr []byte) (*ResponseDumpStorage, error) {
state := consensusState.GetState() state := consensusState.GetState()
account := state.GetAccount(addr) account := state.GetAccount(addr)