-
Notifications
You must be signed in to change notification settings - Fork 28
Conversation
Signed-off-by: Gyuho Lee <[email protected]>
Signed-off-by: Gyuho Lee <[email protected]>
Signed-off-by: Gyuho Lee <[email protected]>
quarkvm/tx_heap.go
Outdated
| return has | ||
| } | ||
|
|
||
| var _ memPool = &txHeap{} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: mempool not memPool
quarkvm/vm.go
Outdated
| // Get the value to put in the new block | ||
| value := vm.mempool[0] | ||
| vm.mempool = vm.mempool[1:] | ||
| maxTx, _ := vm.memPool.popMax() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably want to put a todo here to iterate over txs in pool until tx can't pay more fees: https://github.com/ava-labs/simple-kvvm/blob/86a8737bd9af24f88a838dabefd6877bc6190043/chain/chain.go#L178-L198
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(more than just single tx addition)
quarkvm/vm.go
Outdated
| // (namely, a block with data [data]) | ||
| func (vm *VM) proposeBlock(data [dataLen]byte) { | ||
| vm.mempool = append(vm.mempool, data) | ||
| vm.memPool.push(newTransaction(ids.Empty)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: proposing a block won't be possible anymore, we'll instead use a block-based timer: https://github.com/ava-labs/coreth/blob/master/plugin/evm/block_builder.go
Signed-off-by: Gyuho Lee <[email protected]>
Signed-off-by: Gyuho Lee <[email protected]>
With some readme updates. More changes to follow.