diff --git a/ldb/operational_test.go b/ldb/operational_test.go index d42fd5f2..44d34bd3 100644 --- a/ldb/operational_test.go +++ b/ldb/operational_test.go @@ -93,26 +93,10 @@ out: t.Errorf("referenced tx not found %v ", origintxsha) } - _, _, _, _, err := db.FetchTxAllBySha(origintxsha) - if err != nil { - t.Errorf("referenced tx not found %v err %v ", origintxsha, err) - } - _, _, _, _, err = db.FetchTxAllBySha(origintxsha) - if err != nil { - t.Errorf("referenced tx not found %v err %v ", origintxsha, err) - } _, _, _, err = db.FetchTxBySha(origintxsha) if err != nil { t.Errorf("referenced tx not found %v err %v ", origintxsha, err) } - _, _, err = db.FetchTxBufBySha(origintxsha) - if err != nil { - t.Errorf("referenced tx not found %v err %v ", origintxsha, err) - } - _, err = db.FetchTxUsedBySha(origintxsha) - if err != nil { - t.Errorf("tx used fetch fail %v err %v ", origintxsha, err) - } } } txlist := db.FetchTxByShaList(txneededList) @@ -281,11 +265,6 @@ func testBackout(t *testing.T, mode int) { t.Errorf("tx %v not located db\n", txsha) return } - _, err = db.FetchTxUsedBySha(&txsha) - if err != nil { - t.Errorf("tx %v not located db\n", txsha) - return - } } var savedblocks []*btcutil.Block diff --git a/sqlite3/insertfail_test.go b/sqlite3/insertfail_test.go index 18961443..d6838034 100644 --- a/sqlite3/insertfail_test.go +++ b/sqlite3/insertfail_test.go @@ -84,7 +84,7 @@ out: txin := tx.TxIn[0] origintxsha := &txin.PreviousOutpoint.Hash sqlite3.KillTx(db, origintxsha) - _, _, _, _, err = db.FetchTxAllBySha(origintxsha) + _, _, _, err = db.FetchTxBySha(origintxsha) if err == nil { t.Errorf("deleted tx found %v", origintxsha) } @@ -107,7 +107,7 @@ out: if height == 248 { for _, tx := range mblock.Transactions { txsha, err := tx.TxSha() - _, _, _, _, err = db.FetchTxAllBySha(&txsha) + _, _, _, err = db.FetchTxBySha(&txsha) if err == nil { t.Errorf("referenced tx found, should not have been %v, ", txsha) } diff --git a/sqlite3/operational_test.go b/sqlite3/operational_test.go index 8132f91b..58cb40bb 100644 --- a/sqlite3/operational_test.go +++ b/sqlite3/operational_test.go @@ -99,26 +99,10 @@ out: t.Errorf("referenced tx not found %v ", origintxsha) } - _, _, _, _, err := db.FetchTxAllBySha(origintxsha) - if err != nil { - t.Errorf("referenced tx not found %v err %v ", origintxsha, err) - } - _, _, _, _, err = db.FetchTxAllBySha(origintxsha) - if err != nil { - t.Errorf("referenced tx not found %v err %v ", origintxsha, err) - } _, _, _, err = db.FetchTxBySha(origintxsha) if err != nil { t.Errorf("referenced tx not found %v err %v ", origintxsha, err) } - _, _, err = db.FetchTxBufBySha(origintxsha) - if err != nil { - t.Errorf("referenced tx not found %v err %v ", origintxsha, err) - } - _, err = db.FetchTxUsedBySha(origintxsha) - if err != nil { - t.Errorf("tx used fetch fail %v err %v ", origintxsha, err) - } } } txlist := db.FetchTxByShaList(txneededList) @@ -287,17 +271,7 @@ func testBackout(t *testing.T, mode int) { } _, _, _, err = db.FetchTxBySha(&txsha) - _, err = db.FetchTxUsedBySha(&txsha) - - block = blocks[99] - mblock = block.MsgBlock() - txsha, err = mblock.Transactions[0].TxSha() - oldused, err := db.FetchTxUsedBySha(&txsha) - err = db.InsertTx(&txsha, 99, 1024, 1048, oldused) - if err == nil { - t.Errorf("dup insert of tx succeeded") - return - } + _, _, _, err = db.FetchTxBySha(&txsha) } func loadBlocks(t *testing.T, file string) (blocks []*btcutil.Block, err error) {