mirror of
https://github.com/fluencelabs/tendermint
synced 2025-07-30 19:51:58 +00:00
Use BlockCache for RPC/mempool and added TxId()
TxId() uses signbytes
This commit is contained in:
@@ -13,8 +13,8 @@ func GenPrivAccount() (*ResponseGenPrivAccount, error) {
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
func GetAccount(address []byte) (*ResponseGetAccount, error) {
|
||||
state := consensusState.GetState()
|
||||
return &ResponseGetAccount{state.GetAccount(address)}, nil
|
||||
cache := mempoolReactor.Mempool.GetCache()
|
||||
return &ResponseGetAccount{cache.GetAccount(address)}, nil
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@@ -3,7 +3,6 @@ package core
|
||||
import (
|
||||
"fmt"
|
||||
. "github.com/tendermint/tendermint/common"
|
||||
"github.com/tendermint/tendermint/merkle"
|
||||
"github.com/tendermint/tendermint/state"
|
||||
"github.com/tendermint/tendermint/types"
|
||||
)
|
||||
@@ -24,7 +23,7 @@ func BroadcastTx(tx types.Tx) (*ResponseBroadcastTx, error) {
|
||||
return nil, fmt.Errorf("Error broadcasting transaction: %v", err)
|
||||
}
|
||||
|
||||
txHash := merkle.HashFromBinary(tx)
|
||||
txHash := types.TxId(tx)
|
||||
var createsContract uint8
|
||||
var contractAddr []byte
|
||||
// check if creates new contract
|
||||
|
Reference in New Issue
Block a user