Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Conversation

@gyuho
Copy link
Contributor

@gyuho gyuho commented Nov 18, 2021

With some readme updates. More changes to follow.

return has
}

var _ memPool = &txHeap{}
Copy link
Contributor

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()
Copy link
Contributor

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

Copy link
Contributor

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))
Copy link
Contributor

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]>
@gyuho gyuho merged commit 7fd94be into master Nov 18, 2021
@gyuho gyuho deleted the change branch November 18, 2021 21:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants