Bare consensus refactor

This commit is contained in:
Jae Kwon
2015-11-01 11:34:08 -08:00
parent 5abf2e3c43
commit e12f9d10e7
101 changed files with 342 additions and 12709 deletions

View File

@ -3,7 +3,6 @@ package core
import (
"fmt"
ctypes "github.com/tendermint/tendermint/rpc/core/types"
"github.com/tendermint/tendermint/state"
"github.com/tendermint/tendermint/types"
)
@ -15,18 +14,7 @@ func BroadcastTx(tx types.Tx) (*ctypes.ResultBroadcastTx, error) {
if err != nil {
return nil, fmt.Errorf("Error broadcasting transaction: %v", err)
}
txHash := types.TxID(mempoolReactor.Mempool.GetState().ChainID, tx)
var createsContract uint8
var contractAddr []byte
// check if creates new contract
if callTx, ok := tx.(*types.CallTx); ok {
if len(callTx.Address) == 0 {
createsContract = 1
contractAddr = state.NewContractAddress(callTx.Input.Address, callTx.Input.Sequence)
}
}
return &ctypes.ResultBroadcastTx{ctypes.Receipt{txHash, createsContract, contractAddr}}, nil
return &ctypes.ResultBroadcastTx{}, nil
}
func ListUnconfirmedTxs() (*ctypes.ResultListUnconfirmedTxs, error) {