chg: remove unwanted comments

This commit is contained in:
Jaynti Kanani 2020-10-17 18:52:06 +05:30
parent 45230abb63
commit 0f74eca8c6
No known key found for this signature in database
GPG key ID: 4396982C976BAE5E

View file

@ -1,8 +1,6 @@
package rawdb package rawdb
import ( import (
"fmt"
"github.com/maticnetwork/bor/common" "github.com/maticnetwork/bor/common"
"github.com/maticnetwork/bor/core/types" "github.com/maticnetwork/bor/core/types"
"github.com/maticnetwork/bor/ethdb" "github.com/maticnetwork/bor/ethdb"
@ -13,7 +11,7 @@ import (
var ( var (
borReceiptPrefix = []byte("bor-receipt-") // borReceiptPrefix + number + block hash -> bor block receipt borReceiptPrefix = []byte("bor-receipt-") // borReceiptPrefix + number + block hash -> bor block receipt
// freezerReceiptTable indicates the name of the freezer bor receipts table. // freezerBorReceiptTable indicates the name of the freezer bor receipts table.
freezerBorReceiptTable = "bor-receipts" freezerBorReceiptTable = "bor-receipts"
) )
@ -51,14 +49,13 @@ func ReadBorReceiptRLP(db ethdb.Reader, hash common.Hash, number uint64) rlp.Raw
// Then try to look up the data in leveldb. // Then try to look up the data in leveldb.
data, _ = db.Get(borReceiptKey(number, hash)) data, _ = db.Get(borReceiptKey(number, hash))
if len(data) > 0 { if len(data) > 0 {
fmt.Println("==> RAWDB IN ReadBorReceiptRLP", common.Bytes2Hex(data))
return data return data
} }
// In the background freezer is moving data from leveldb to flatten files. // In the background freezer is moving data from leveldb to flatten files.
// So during the first check for ancient db, the data is not yet in there, // So during the first check for ancient db, the data is not yet in there,
// but when we reach into leveldb, the data was already moved. That would // but when we reach into leveldb, the data was already moved. That would
// result in a not found error. // result in a not found error.
data, _ = db.Ancient(freezerReceiptTable, number) data, _ = db.Ancient(freezerBorReceiptTable, number)
if len(data) > 0 { if len(data) > 0 {
h, _ := db.Ancient(freezerHashTable, number) h, _ := db.Ancient(freezerHashTable, number)
if common.BytesToHash(h) == hash { if common.BytesToHash(h) == hash {