aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-06-12 03:55:45 +0800
committerobscuren <geffobscura@gmail.com>2014-06-12 03:55:45 +0800
commit9ee6295c752a518603de01e4feaec787c61a5dcf (patch)
treee25b46e294bf0cfc556a6a3438977c53f9052d95
parent1bf6f8b4a6936d8ad14b345b2cfa4dc9d1f8a360 (diff)
downloadgo-tangerine-9ee6295c752a518603de01e4feaec787c61a5dcf.tar
go-tangerine-9ee6295c752a518603de01e4feaec787c61a5dcf.tar.gz
go-tangerine-9ee6295c752a518603de01e4feaec787c61a5dcf.tar.bz2
go-tangerine-9ee6295c752a518603de01e4feaec787c61a5dcf.tar.lz
go-tangerine-9ee6295c752a518603de01e4feaec787c61a5dcf.tar.xz
go-tangerine-9ee6295c752a518603de01e4feaec787c61a5dcf.tar.zst
go-tangerine-9ee6295c752a518603de01e4feaec787c61a5dcf.zip
Minor changes
-rw-r--r--ethchain/block_chain.go3
-rw-r--r--ethminer/miner.go3
-rw-r--r--peer.go4
3 files changed, 5 insertions, 5 deletions
diff --git a/ethchain/block_chain.go b/ethchain/block_chain.go
index b45d254b5..68ef9d47e 100644
--- a/ethchain/block_chain.go
+++ b/ethchain/block_chain.go
@@ -271,7 +271,7 @@ func (bc *BlockChain) GetChain(hash []byte, amount int) []*Block {
func AddTestNetFunds(block *Block) {
for _, addr := range []string{
- "8a40bfaa73256b60764c1bf40675a99083efb075",
+ "51ba59315b3a95761d0863b05ccc7a7f54703d99",
"e4157b34ea9615cfbde6b4fda419828124b70c78",
"1e12515ce3e0f817a4ddef9ca55788a1d66bd2df",
"6c386a4b26f73c802f34673f7248bb118f97424a",
@@ -285,7 +285,6 @@ func AddTestNetFunds(block *Block) {
account.Amount = ethutil.Big("1606938044258990275541962092341162602522202993782792835301376") //ethutil.BigPow(2, 200)
block.state.UpdateStateObject(account)
}
- log.Printf("%x\n", block.RlpEncode())
}
func (bc *BlockChain) setLastBlock() {
diff --git a/ethminer/miner.go b/ethminer/miner.go
index 19ff5dd9e..d05405391 100644
--- a/ethminer/miner.go
+++ b/ethminer/miner.go
@@ -137,7 +137,7 @@ func (self *Miner) mineNewBlock() {
// Sort the transactions by nonce in case of odd network propagation
sort.Sort(ethchain.TxByNonce{self.txs})
// Accumulate all valid transaction and apply them to the new state
- receipts, txs := stateManager.ApplyTransactions(self.block.State(), self.block, self.txs)
+ receipts, txs := stateManager.ApplyTransactions(self.block.Coinbase, self.block.State(), self.block, self.txs)
self.txs = txs
// Set the transactions to the block so the new SHA3 can be calculated
self.block.SetReceipts(receipts, txs)
@@ -155,6 +155,7 @@ func (self *Miner) mineNewBlock() {
} else {
self.ethereum.Broadcast(ethwire.MsgBlockTy, []interface{}{self.block.Value().Val})
ethutil.Config.Log.Infof("[MINER] 🔨 Mined block %x\n", self.block.Hash())
+ ethutil.Config.Log.Infoln(self.block)
// Gather the new batch of transactions currently in the tx pool
self.txs = self.ethereum.TxPool().CurrentTransactions()
}
diff --git a/peer.go b/peer.go
index eed5bec30..acebd2756 100644
--- a/peer.go
+++ b/peer.go
@@ -17,7 +17,7 @@ const (
// The size of the output buffer for writing messages
outputBufferSize = 50
// Current protocol version
- ProtocolVersion = 17
+ ProtocolVersion = 20
)
type DiscReason byte
@@ -603,7 +603,7 @@ func (p *Peer) handleHandshake(msg *ethwire.Msg) {
c := msg.Data
if c.Get(0).Uint() != ProtocolVersion {
- ethutil.Config.Log.Debugln("Invalid peer version. Require protocol:", ProtocolVersion)
+ ethutil.Config.Log.Debugf("Invalid peer version. Require protocol: %d. Received: %d\n", ProtocolVersion, c.Get(0).Uint())
p.Stop()
return
}