miner: minor.
This commit is contained in:
parent
eb5469088c
commit
d78df4b79c
@ -250,13 +250,6 @@ Miner.prototype.getAddress = function getAddress() {
|
||||
*/
|
||||
|
||||
Miner.prototype.assemble = function assemble(attempt) {
|
||||
let priority = this.options.priorityWeight > 0;
|
||||
const queue = new Heap(cmpRate);
|
||||
const depMap = new Map();
|
||||
|
||||
if (priority)
|
||||
queue.set(cmpPriority);
|
||||
|
||||
if (!this.mempool) {
|
||||
attempt.refresh();
|
||||
return;
|
||||
@ -265,6 +258,14 @@ Miner.prototype.assemble = function assemble(attempt) {
|
||||
assert(this.mempool.tip === this.chain.tip.hash,
|
||||
'Mempool/chain tip mismatch! Unsafe to create block.');
|
||||
|
||||
const depMap = new Map();
|
||||
const queue = new Heap(cmpRate);
|
||||
|
||||
let priority = this.options.priorityWeight > 0;
|
||||
|
||||
if (priority)
|
||||
queue.set(cmpPriority);
|
||||
|
||||
for (const entry of this.mempool.map.values()) {
|
||||
const item = BlockEntry.fromEntry(entry, attempt);
|
||||
const tx = item.tx;
|
||||
@ -296,6 +297,7 @@ Miner.prototype.assemble = function assemble(attempt) {
|
||||
const item = queue.shift();
|
||||
const tx = item.tx;
|
||||
const hash = item.hash;
|
||||
|
||||
let weight = attempt.weight;
|
||||
let sigops = attempt.sigops;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user