permission: minor fixes

This commit is contained in:
Trung Nguyen 2019-09-09 10:28:09 -04:00
parent 50f5852ae4
commit 40342a1322
No known key found for this signature in database
GPG Key ID: 4636434ED9505EB7
4 changed files with 10 additions and 19 deletions

View File

@ -62,6 +62,8 @@ func NewKeyedTransactor(key *ecdsa.PrivateKey) *TransactOpts {
}
}
// Quorum
//
// NewWalletTransactor is a utility method to easily create a transaction signer
// from a wallet account
func NewWalletTransactor(w accounts.Wallet, from accounts.Account) *TransactOpts {

View File

@ -64,7 +64,6 @@ func Fatalf(format string, args ...interface{}) {
}
func StartNode(stack *node.Node) {
if err := stack.Start(); err != nil {
Fatalf("Error starting protocol stack: %v", err)
}

View File

@ -277,17 +277,6 @@ func NewTxPool(config TxPoolConfig, chainconfig *params.ChainConfig, chain block
return pool
}
// Nonce returns the nonce for the given addr from the pending state.
// Can only be used for local transactions.
func (pool *TxPool) Nonce(addr common.Address) uint64 {
pool.mu.Lock()
defer pool.mu.Unlock()
if pool.pendingState == nil {
pool.lockedReset(nil, nil)
}
return pool.pendingState.GetNonce(addr)
}
// loop is the transaction pool's main event loop, waiting for and reacting to
// outside blockchain events as well as for various reporting and transaction
// eviction events.

View File

@ -1,12 +1,13 @@
package types
import (
"github.com/ethereum/go-ethereum/p2p/enode"
"math/big"
"sync"
"github.com/ethereum/go-ethereum/p2p/enode"
"github.com/ethereum/go-ethereum/common"
"github.com/hashicorp/golang-lru"
lru "github.com/hashicorp/golang-lru"
)
type AccessType uint8
@ -105,8 +106,8 @@ type PermissionConfig struct {
OrgAdminRole string `json:"orgAdminRole"`
Accounts []common.Address `json:"accounts"` //initial list of account that need full access
SubOrgDepth *big.Int `json:"subOrgBreadth"`
SubOrgBreadth *big.Int `json:"subOrgDepth"`
SubOrgDepth *big.Int `json:"subOrgBreadth"`
SubOrgBreadth *big.Int `json:"subOrgDepth"`
}
type OrgKey struct {
@ -133,15 +134,15 @@ type OrgCache struct {
}
type NodeCache struct {
c *lru.Cache
c *lru.Cache
}
type RoleCache struct {
c *lru.Cache
c *lru.Cache
}
type AcctCache struct {
c *lru.Cache
c *lru.Cache
}
func NewOrgCache() *OrgCache {