aboutsummaryrefslogtreecommitdiffstats
path: root/block_manager.go
diff options
context:
space:
mode:
authorobscuren <obscuren@obscura.com>2014-01-03 06:02:24 +0800
committerobscuren <obscuren@obscura.com>2014-01-03 06:02:24 +0800
commit9df4c745119b3ed10a7ad17887e8dd9cac249af7 (patch)
tree8ae82afaf78a225d685a146a4cc67a77d3ca773d /block_manager.go
parent5b3d4fae6e03e5471a10c653fc0b016cc5e5dcfa (diff)
downloadgo-tangerine-9df4c745119b3ed10a7ad17887e8dd9cac249af7.tar
go-tangerine-9df4c745119b3ed10a7ad17887e8dd9cac249af7.tar.gz
go-tangerine-9df4c745119b3ed10a7ad17887e8dd9cac249af7.tar.bz2
go-tangerine-9df4c745119b3ed10a7ad17887e8dd9cac249af7.tar.lz
go-tangerine-9df4c745119b3ed10a7ad17887e8dd9cac249af7.tar.xz
go-tangerine-9df4c745119b3ed10a7ad17887e8dd9cac249af7.tar.zst
go-tangerine-9df4c745119b3ed10a7ad17887e8dd9cac249af7.zip
WIP rewrite vm
Diffstat (limited to 'block_manager.go')
-rw-r--r--block_manager.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/block_manager.go b/block_manager.go
index a60d4340d..0ef5d1108 100644
--- a/block_manager.go
+++ b/block_manager.go
@@ -33,7 +33,7 @@ func (bm *BlockManager) ProcessBlock(block *Block) error {
// Process each transaction/contract
for _, tx := range block.transactions {
- go bm.ProcessTransaction(tx, lockChan)
+ go bm.ProcessTransaction(tx, block, lockChan)
}
// Wait for all Tx to finish processing
@@ -44,9 +44,9 @@ func (bm *BlockManager) ProcessBlock(block *Block) error {
return nil
}
-func (bm *BlockManager) ProcessTransaction(tx *Transaction, lockChan chan bool) {
+func (bm *BlockManager) ProcessTransaction(tx *Transaction, block *Block, lockChan chan bool) {
if tx.recipient == "\x00" {
- bm.vm.RunTransaction(tx, func(opType OpType) bool {
+ bm.vm.RunTransaction(tx, block, func(opType OpType) bool {
// TODO calculate fees
return true // Continue