If data for tx is not present, return error.
This commit is contained in:
parent
4d63076526
commit
dd41d71a31
1 changed files with 4 additions and 0 deletions
|
@ -350,6 +350,10 @@ func (db *LevelDb) fetchTxDataByLoc(blkHeight int64, txOff int, txLen int, txspe
|
|||
//log.Trace("transaction %v is at block %v %v txoff %v, txlen %v\n",
|
||||
// txsha, blksha, blkHeight, txOff, txLen)
|
||||
|
||||
if len(blkbuf) < txOff+txLen {
|
||||
err = btcdb.TxShaMissing
|
||||
return
|
||||
}
|
||||
rbuf := bytes.NewBuffer(blkbuf[txOff : txOff+txLen])
|
||||
|
||||
var tx btcwire.MsgTx
|
||||
|
|
Loading…
Add table
Reference in a new issue