}
for position, tx := range block.Transactions {
- // get := w.store.GetGlobalTransactionIndex(tx.ID.String())
get := testDB.Get(database.CalcGlobalTxIndexKey(tx.ID.String()))
bh := block.BlockHeader.Hash()
expect := database.CalcGlobalTxIndex(&bh, uint64(position))
package wallet
import (
- "fmt"
"sync"
log "github.com/sirupsen/logrus"
w.rw.Lock()
defer w.rw.Unlock()
- fmt.Println("block.PreviousBlockHash:", block.PreviousBlockHash)
- fmt.Println("w.status.WorkHash:", w.status.WorkHash)
-
if block.PreviousBlockHash != w.status.WorkHash {
log.Warn("wallet skip attachBlock due to status hash not equal to previous hash")
return nil