mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-22 17:31:34 +00:00
s/GetHash/Commit/g
This commit is contained in:
@ -77,9 +77,9 @@ func TestSerialReap(t *testing.T) {
|
|||||||
code, result, logStr)
|
code, result, logStr)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
hash, log := appConnCon.GetHash()
|
hash, log := appConnCon.Commit()
|
||||||
if len(hash) != 8 {
|
if len(hash) != 8 {
|
||||||
t.Errorf("Error getting hash. Hash:%X log:%v", hash, log)
|
t.Errorf("Error committing. Hash:%X log:%v", hash, log)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -242,7 +242,7 @@ func getProxyApp(addr string, hash []byte) (proxyAppConn proxy.AppConn) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check the hash
|
// Check the hash
|
||||||
currentHash, _, err := proxyAppConn.GetHashSync()
|
currentHash, _, err := proxyAppConn.CommitSync()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
PanicCrisis(Fmt("Error in getting proxyAppConn hash: %v", err))
|
PanicCrisis(Fmt("Error in getting proxyAppConn hash: %v", err))
|
||||||
}
|
}
|
||||||
|
@ -12,10 +12,10 @@ type AppConn interface {
|
|||||||
FlushAsync() *tmspcli.ReqRes
|
FlushAsync() *tmspcli.ReqRes
|
||||||
AppendTxAsync(tx []byte) *tmspcli.ReqRes
|
AppendTxAsync(tx []byte) *tmspcli.ReqRes
|
||||||
CheckTxAsync(tx []byte) *tmspcli.ReqRes
|
CheckTxAsync(tx []byte) *tmspcli.ReqRes
|
||||||
GetHashAsync() *tmspcli.ReqRes
|
CommitAsync() *tmspcli.ReqRes
|
||||||
SetOptionAsync(key string, value string) *tmspcli.ReqRes
|
SetOptionAsync(key string, value string) *tmspcli.ReqRes
|
||||||
|
|
||||||
InfoSync() (info string, err error)
|
InfoSync() (info string, err error)
|
||||||
FlushSync() error
|
FlushSync() error
|
||||||
GetHashSync() (hash []byte, log string, err error)
|
CommitSync() (hash []byte, log string, err error)
|
||||||
}
|
}
|
||||||
|
@ -76,13 +76,13 @@ func (app *localAppConn) CheckTxAsync(tx []byte) *tmspcli.ReqRes {
|
|||||||
return nil // TODO maybe create a ReqRes
|
return nil // TODO maybe create a ReqRes
|
||||||
}
|
}
|
||||||
|
|
||||||
func (app *localAppConn) GetHashAsync() *tmspcli.ReqRes {
|
func (app *localAppConn) CommitAsync() *tmspcli.ReqRes {
|
||||||
app.mtx.Lock()
|
app.mtx.Lock()
|
||||||
hash, log := app.Application.GetHash()
|
hash, log := app.Application.Commit()
|
||||||
app.mtx.Unlock()
|
app.mtx.Unlock()
|
||||||
app.Callback(
|
app.Callback(
|
||||||
tmsp.RequestGetHash(),
|
tmsp.RequestCommit(),
|
||||||
tmsp.ResponseGetHash(hash, log),
|
tmsp.ResponseCommit(hash, log),
|
||||||
)
|
)
|
||||||
return nil // TODO maybe create a ReqRes
|
return nil // TODO maybe create a ReqRes
|
||||||
}
|
}
|
||||||
@ -98,9 +98,9 @@ func (app *localAppConn) FlushSync() error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (app *localAppConn) GetHashSync() (hash []byte, log string, err error) {
|
func (app *localAppConn) CommitSync() (hash []byte, log string, err error) {
|
||||||
app.mtx.Lock()
|
app.mtx.Lock()
|
||||||
hash, log = app.Application.GetHash()
|
hash, log = app.Application.Commit()
|
||||||
app.mtx.Unlock()
|
app.mtx.Unlock()
|
||||||
return hash, log, nil
|
return hash, log, nil
|
||||||
}
|
}
|
||||||
|
@ -84,13 +84,13 @@ func (s *State) execBlockOnProxyApp(evsw *events.EventSwitch, proxyAppConn proxy
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
hash, logStr, err := proxyAppConn.GetHashSync()
|
hash, logStr, err := proxyAppConn.CommitSync()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Warn("Error computing proxyAppConn hash", "error", err)
|
log.Warn("Error computing proxyAppConn hash", "error", err)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if logStr != "" {
|
if logStr != "" {
|
||||||
log.Debug("GetHash.Log: " + logStr)
|
log.Debug("Commit.Log: " + logStr)
|
||||||
}
|
}
|
||||||
log.Info(Fmt("ExecBlock got %v valid txs and %v invalid txs", validTxs, invalidTxs))
|
log.Info(Fmt("ExecBlock got %v valid txs and %v invalid txs", validTxs, invalidTxs))
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user