This repository was archived by the owner on Apr 6, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -16,11 +16,11 @@ const rlp = ethUtil.rlp
16
16
// geth compatible db keys
17
17
const headHeaderKey = 'LastHeader' // current canonical head for light sync
18
18
const headBlockKey = 'LastBlock' // current canonical head for full sync
19
- const headerPrefix = new Buffer ( 'h' ) // headerPrefix + number + hash -> header
20
- const tdSuffix = new Buffer ( 't' ) // headerPrefix + number + hash + tdSuffix -> td
21
- const numSuffix = new Buffer ( 'n' ) // headerPrefix + number + numSuffix -> hash
22
- const blockHashPrefix = new Buffer ( 'H' ) // blockHashPrefix + hash -> number
23
- const bodyPrefix = new Buffer ( 'b' ) // bodyPrefix + number + hash -> block body
19
+ const headerPrefix = Buffer . from ( 'h' ) // headerPrefix + number + hash -> header
20
+ const tdSuffix = Buffer . from ( 't' ) // headerPrefix + number + hash + tdSuffix -> td
21
+ const numSuffix = Buffer . from ( 'n' ) // headerPrefix + number + numSuffix -> hash
22
+ const blockHashPrefix = Buffer . from ( 'H' ) // blockHashPrefix + hash -> number
23
+ const bodyPrefix = Buffer . from ( 'b' ) // bodyPrefix + number + hash -> block body
24
24
25
25
// utility functions
26
26
const bufBE8 = n => n . toArrayLike ( Buffer , 'be' , 8 ) // convert BN to big endian Buffer
You can’t perform that action at this time.
0 commit comments