mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-17 09:23:48 +00:00
les: fixed tx status test and rlp encoding
This commit is contained in:
parent
6cef375d22
commit
192d23327c
2 changed files with 11 additions and 1 deletions
|
|
@ -104,7 +104,7 @@ var (
|
|||
)
|
||||
|
||||
// TxStatus is the current status of a transaction as seen py the pool.
|
||||
type TxStatus int
|
||||
type TxStatus uint
|
||||
|
||||
const (
|
||||
TxStatusUnknown TxStatus = iota
|
||||
|
|
|
|||
|
|
@ -464,6 +464,16 @@ func TestTransactionStatusLes2(t *testing.T) {
|
|||
if _, err := chain.InsertChain(gchain); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
// wait until TxPool processes the inserted block
|
||||
for i := 0; i < 10; i++ {
|
||||
if pending, _ := txpool.Stats(); pending == 1 {
|
||||
break
|
||||
}
|
||||
time.Sleep(100 * time.Millisecond)
|
||||
}
|
||||
if pending, _ := txpool.Stats(); pending != 1 {
|
||||
t.Fatalf("pending count mismatch: have %d, want 1", pending)
|
||||
}
|
||||
|
||||
// check if their status is included now
|
||||
block1hash := core.GetCanonicalHash(db, 1)
|
||||
|
|
|
|||
Loading…
Reference in a new issue