Merge pull request #1663 from obscuren/issue-1662

xeth: added a transact mu
This commit is contained in:
Jeffrey Wilcke 2015-08-15 14:55:04 -07:00
commit 59b28cfa31
1 changed files with 4 additions and 4 deletions

View File

@ -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()