diff options
author | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-08-16 05:55:04 +0800 |
---|---|---|
committer | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-08-16 05:55:04 +0800 |
commit | 59b28cfa311f7852ef9bd93ec64961b6c3a8d760 (patch) | |
tree | 095b8422cf1bc0e60b74f0005fea16f40e654d8c | |
parent | 5c5c3930b708e55ea119329f7da504944ebdd73c (diff) | |
parent | 7bb5ac045e5e2f06bbae085114aeffc80af58de4 (diff) | |
download | dexon-59b28cfa311f7852ef9bd93ec64961b6c3a8d760.tar dexon-59b28cfa311f7852ef9bd93ec64961b6c3a8d760.tar.gz dexon-59b28cfa311f7852ef9bd93ec64961b6c3a8d760.tar.bz2 dexon-59b28cfa311f7852ef9bd93ec64961b6c3a8d760.tar.lz dexon-59b28cfa311f7852ef9bd93ec64961b6c3a8d760.tar.xz dexon-59b28cfa311f7852ef9bd93ec64961b6c3a8d760.tar.zst dexon-59b28cfa311f7852ef9bd93ec64961b6c3a8d760.zip |
Merge pull request #1663 from obscuren/issue-1662
xeth: added a transact mu
-rw-r--r-- | xeth/xeth.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/xeth/xeth.go b/xeth/xeth.go index 5a57608bc..0ad0e507a 100644 --- a/xeth/xeth.go +++ b/xeth/xeth.go @@ -89,8 +89,7 @@ type XEth struct { messagesMu sync.RWMutex messages map[int]*whisperFilter - // regmut sync.Mutex - // register map[string][]*interface{} // TODO improve return type + transactMu sync.Mutex agent *miner.RemoteAgent @@ -952,8 +951,9 @@ func (self *XEth) Transact(fromStr, toStr, nonceStr, valueStr, gasStr, gasPriceS } */ - // TODO: align default values to have the same type, e.g. not depend on - // common.Value conversions later on + self.transactMu.Lock() + defer self.transactMu.Unlock() + var nonce uint64 if len(nonceStr) != 0 { nonce = common.Big(nonceStr).Uint64() |