mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-05 07:37:14 +00:00
AppendTx -> DeliverTx
This commit is contained in:
@@ -28,7 +28,7 @@ func (app *DummyApplication) SetOption(key string, value string) (log string) {
|
||||
}
|
||||
|
||||
// tx is either "key=value" or just arbitrary bytes
|
||||
func (app *DummyApplication) AppendTx(tx []byte) types.Result {
|
||||
func (app *DummyApplication) DeliverTx(tx []byte) types.Result {
|
||||
parts := strings.Split(string(tx), "=")
|
||||
if len(parts) == 2 {
|
||||
app.state.Set([]byte(parts[0]), []byte(parts[1]))
|
||||
|
||||
@@ -13,10 +13,10 @@ import (
|
||||
)
|
||||
|
||||
func testDummy(t *testing.T, dummy types.Application, tx []byte, key, value string) {
|
||||
if r := dummy.AppendTx(tx); r.IsErr() {
|
||||
if r := dummy.DeliverTx(tx); r.IsErr() {
|
||||
t.Fatal(r)
|
||||
}
|
||||
if r := dummy.AppendTx(tx); r.IsErr() {
|
||||
if r := dummy.DeliverTx(tx); r.IsErr() {
|
||||
t.Fatal(r)
|
||||
}
|
||||
|
||||
@@ -175,7 +175,7 @@ func makeApplyBlock(t *testing.T, dummy types.Application, heightInt int, diff [
|
||||
dummyChain := dummy.(types.BlockchainAware) // hmm...
|
||||
dummyChain.BeginBlock(hash, header)
|
||||
for _, tx := range txs {
|
||||
if r := dummy.AppendTx(tx); r.IsErr() {
|
||||
if r := dummy.DeliverTx(tx); r.IsErr() {
|
||||
t.Fatal(r)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ func (app *PersistentDummyApplication) SetOption(key string, value string) (log
|
||||
}
|
||||
|
||||
// tx is either "key=value" or just arbitrary bytes
|
||||
func (app *PersistentDummyApplication) AppendTx(tx []byte) types.Result {
|
||||
func (app *PersistentDummyApplication) DeliverTx(tx []byte) types.Result {
|
||||
// if it starts with "val:", update the validator set
|
||||
// format is "val:pubkey/power"
|
||||
if isValidatorTx(tx) {
|
||||
@@ -69,7 +69,7 @@ func (app *PersistentDummyApplication) AppendTx(tx []byte) types.Result {
|
||||
}
|
||||
|
||||
// otherwise, update the key-value store
|
||||
return app.app.AppendTx(tx)
|
||||
return app.app.DeliverTx(tx)
|
||||
}
|
||||
|
||||
func (app *PersistentDummyApplication) CheckTx(tx []byte) types.Result {
|
||||
|
||||
Reference in New Issue
Block a user