|
|
@ -100,6 +100,11 @@ func (sm *StateManager) MakeContract(state *State, tx *Transaction) *StateObject |
|
|
|
func (sm *StateManager) ApplyTransactions(state *State, block *Block, txs []*Transaction) { |
|
|
|
func (sm *StateManager) ApplyTransactions(state *State, block *Block, txs []*Transaction) { |
|
|
|
// Process each transaction/contract
|
|
|
|
// Process each transaction/contract
|
|
|
|
for _, tx := range txs { |
|
|
|
for _, tx := range txs { |
|
|
|
|
|
|
|
sm.ApplyTransaction(state, block, tx) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func (sm *StateManager) ApplyTransaction(state *State, block *Block, tx *Transaction) { |
|
|
|
// If there's no recipient, it's a contract
|
|
|
|
// If there's no recipient, it's a contract
|
|
|
|
// Check if this is a contract creation traction and if so
|
|
|
|
// Check if this is a contract creation traction and if so
|
|
|
|
// create a contract of this tx.
|
|
|
|
// create a contract of this tx.
|
|
|
@ -126,7 +131,6 @@ func (sm *StateManager) ApplyTransactions(state *State, block *Block, txs []*Tra |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Block processing and validating with a given (temporarily) state
|
|
|
|
// Block processing and validating with a given (temporarily) state
|
|
|
|
func (sm *StateManager) ProcessBlock(state *State, block *Block, dontReact bool) error { |
|
|
|
func (sm *StateManager) ProcessBlock(state *State, block *Block, dontReact bool) error { |
|
|
|