Skip to content

Commit

Permalink
Merge f6a6063 into 31ad2f3
Browse files Browse the repository at this point in the history
  • Loading branch information
elvis88 committed Apr 19, 2019
2 parents 31ad2f3 + f6a6063 commit 88ec5c2
Show file tree
Hide file tree
Showing 10 changed files with 78 additions and 75 deletions.
2 changes: 1 addition & 1 deletion accountmanager/accountmanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -1155,7 +1155,7 @@ func (am *AccountManager) IssueAsset(asset *asset.AssetObject) error {
}
}

if err := am.ast.IssueAsset(asset.GetAssetName(), asset.GetAssetNumber(), asset.GetSymbol(), asset.GetAssetAmount(), asset.GetDecimals(), asset.GetAssetFounder(), asset.GetAssetOwner(), asset.GetUpperLimit()); err != nil {
if err := am.ast.IssueAsset(asset.GetAssetName(), asset.GetAssetNumber(), asset.GetSymbol(), asset.GetAssetAmount(), asset.GetDecimals(), asset.GetAssetFounder(), asset.GetAssetOwner(), asset.GetUpperLimit(), asset.GetContract()); err != nil {
return err
}

Expand Down
12 changes: 6 additions & 6 deletions accountmanager/accountmanager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ func TestAccountManager_GetAccountBalanceByID(t *testing.T) {
assetID uint64
}
//asset ID = 1
acctm.ast.IssueAsset("ziz", 0, "zz", big.NewInt(1000), 0, common.Name("a123456789aeee"), common.Name("a123456789aeee"), big.NewInt(1000))
acctm.ast.IssueAsset("ziz", 0, "zz", big.NewInt(1000), 0, common.Name("a123456789aeee"), common.Name("a123456789aeee"), big.NewInt(1000), common.Name(""))
id, _ := acctm.ast.GetAssetIdByName("ziz")
t.Logf("GetAccountBalanceByID id=%v", id)
if err := acctm.AddAccountBalanceByID(common.Name("a123456789aeee"), id, big.NewInt(800)); err != nil {
Expand Down Expand Up @@ -625,7 +625,7 @@ func TestAccountManager_GetAssetInfoByName(t *testing.T) {
type args struct {
name string
}
ast1, err := asset.NewAssetObject("ziz", 0, "zz", big.NewInt(1000), 0, common.Name("a123456789aeee"), common.Name("a123456789aeee"), big.NewInt(1000))
ast1, err := asset.NewAssetObject("ziz", 0, "zz", big.NewInt(1000), 0, common.Name("a123456789aeee"), common.Name("a123456789aeee"), big.NewInt(1000), common.Name(""))
if err != nil {
t.Errorf("new asset object err")
}
Expand Down Expand Up @@ -666,7 +666,7 @@ func TestAccountManager_GetAssetInfoByID(t *testing.T) {
assetID uint64
}

ast1, err := asset.NewAssetObject("ziz", 0, "zz", big.NewInt(1000), 0, common.Name("a123456789aeee"), common.Name("a123456789aeee"), big.NewInt(1000))
ast1, err := asset.NewAssetObject("ziz", 0, "zz", big.NewInt(1000), 0, common.Name("a123456789aeee"), common.Name("a123456789aeee"), big.NewInt(1000), common.Name(""))
if err != nil {
t.Errorf("new asset object err")
}
Expand Down Expand Up @@ -1342,17 +1342,17 @@ func TestAccountManager_IssueAsset(t *testing.T) {
// t.Fatal("IssueAsset err", err)
//}

ast1, err := asset.NewAssetObject("ziz0123456789ziz", 0, "ziz", big.NewInt(2), 18, common.Name("a123456789aeee"), common.Name("a0123456789ziz"), big.NewInt(100000))
ast1, err := asset.NewAssetObject("ziz0123456789ziz", 0, "ziz", big.NewInt(2), 18, common.Name("a123456789aeee"), common.Name("a0123456789ziz"), big.NewInt(100000), common.Name(""))
if err != nil {
t.Fatal("IssueAsset err", err)
}

ast3, err := asset.NewAssetObject("ziz0123456789", 0, "ziz", big.NewInt(2), 18, common.Name("a123456777777"), common.Name("a123456789aeee"), big.NewInt(2))
ast3, err := asset.NewAssetObject("ziz0123456789", 0, "ziz", big.NewInt(2), 18, common.Name("a123456777777"), common.Name("a123456789aeee"), big.NewInt(2), common.Name(""))
if err != nil {
t.Fatal("IssueAsset err", err)
}
//asset id =2
ast2, err := asset.NewAssetObject("ziz0123456789zi", 0, "ziz", big.NewInt(2), 18, common.Name("a123456789aeee"), common.Name("a123456789aeee"), big.NewInt(12000))
ast2, err := asset.NewAssetObject("ziz0123456789zi", 0, "ziz", big.NewInt(2), 18, common.Name("a123456789aeee"), common.Name("a123456789aeee"), big.NewInt(12000), common.Name(""))
if err != nil {
t.Fatal("IssueAsset err", err)
}
Expand Down
4 changes: 2 additions & 2 deletions asset/asset.go
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ func (a *Asset) IssueAssetObject(ao *AssetObject) (uint64, error) {
}

//IssueAsset issue asset
func (a *Asset) IssueAsset(assetName string, number uint64, symbol string, amount *big.Int, dec uint64, founder common.Name, owner common.Name, limit *big.Int) error {
func (a *Asset) IssueAsset(assetName string, number uint64, symbol string, amount *big.Int, dec uint64, founder common.Name, owner common.Name, limit *big.Int, contract common.Name) error {
if !common.IsValidAssetName(assetName) {
return fmt.Errorf("%s is invalid", assetName)
}
Expand All @@ -299,7 +299,7 @@ func (a *Asset) IssueAsset(assetName string, number uint64, symbol string, amoun
return ErrAssetIsExist
}

ao, err := NewAssetObject(assetName, number, symbol, amount, dec, founder, owner, limit)
ao, err := NewAssetObject(assetName, number, symbol, amount, dec, founder, owner, limit, contract)
if err != nil {
return err
}
Expand Down
21 changes: 13 additions & 8 deletions asset/asset_object.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,20 @@ import (
)

type AssetObject struct {
AssetId uint64 `json:"assetId"`
Number uint64 `json:"Number"`
AssetName string `json:"assetName,omitempty"`
Symbol string `json:"symbol,omitempty"`
AssetId uint64 `json:"assetId,omitempty"`
Number uint64 `json:"number,omitempty"`
AssetName string `json:"assetName"`
Symbol string `json:"symbol"`
Amount *big.Int `json:"amount"`
Decimals uint64 `json:"decimals"`
Founder common.Name `json:"founder,omitempty"`
Owner common.Name `json:"owner,omitempty"`
Founder common.Name `json:"founder"`
Owner common.Name `json:"owner"`
AddIssue *big.Int `json:"addIssue"`
UpperLimit *big.Int `json:"upperLimit"`
Contract common.Name `json:"contract,omitempty"`
Contract common.Name `json:"contract"`
}

func NewAssetObject(assetName string, number uint64, symbol string, amount *big.Int, dec uint64, founder common.Name, owner common.Name, limit *big.Int) (*AssetObject, error) {
func NewAssetObject(assetName string, number uint64, symbol string, amount *big.Int, dec uint64, founder common.Name, owner common.Name, limit *big.Int, contract common.Name) (*AssetObject, error) {
if assetName == "" || symbol == "" || owner == "" {
return nil, ErrNewAssetObject
}
Expand Down Expand Up @@ -71,6 +71,7 @@ func NewAssetObject(assetName string, number uint64, symbol string, amount *big.
Owner: owner,
AddIssue: amount,
UpperLimit: limit,
Contract: contract,
}
return &ao, nil
}
Expand Down Expand Up @@ -130,6 +131,10 @@ func (ao *AssetObject) GetUpperLimit() *big.Int {
return ao.UpperLimit
}

func (ao *AssetObject) GetContract() common.Name {
return ao.Contract
}

func (ao *AssetObject) SetAssetAmount(amount *big.Int) {
ao.Amount = amount
}
Expand Down
2 changes: 1 addition & 1 deletion asset/asset_object_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func Test_newAssetObject(t *testing.T) {
{"emptyname", args{"ft", "#ip0123456789ft", big.NewInt(2), 18, common.Name("a123"), common.Name("a123"), big.NewInt(999999)}, nil, true},
}
for _, tt := range tests {
got, err := NewAssetObject(tt.args.assetName, 0, tt.args.symbol, tt.args.amount, tt.args.dec, tt.args.founder, tt.args.owner, tt.args.UpperLimit)
got, err := NewAssetObject(tt.args.assetName, 0, tt.args.symbol, tt.args.amount, tt.args.dec, tt.args.founder, tt.args.owner, tt.args.UpperLimit, common.Name(""))
if (err != nil) != tt.wantErr {
t.Errorf("%q. newAssetObject() error = %v, wantErr %v", tt.name, err, tt.wantErr)
continue
Expand Down
20 changes: 10 additions & 10 deletions asset/asset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,13 @@ func TestAsset_GetAssetObjectByName(t *testing.T) {
assetName string
}

ao, _ := NewAssetObject("ft", 0, "zz", big.NewInt(1000), 10, common.Name(""), common.Name("a123456789aeee"), big.NewInt(9999999999))
ao, _ := NewAssetObject("ft", 0, "zz", big.NewInt(1000), 10, common.Name(""), common.Name("a123456789aeee"), big.NewInt(9999999999), common.Name(""))
ao.SetAssetId(1)
ast.addNewAssetObject(ao)
ao1, _ := NewAssetObject("ft2", 0, "zz2", big.NewInt(1000), 10, common.Name(""), common.Name("a123456789aeee"), big.NewInt(9999999999))
ao1, _ := NewAssetObject("ft2", 0, "zz2", big.NewInt(1000), 10, common.Name(""), common.Name("a123456789aeee"), big.NewInt(9999999999), common.Name(""))
ao1.SetAssetId(2)
ast.addNewAssetObject(ao1)
ao2, _ := NewAssetObject("ft0", 0, "zz0", big.NewInt(1000), 0, common.Name(""), common.Name("a123456789aeee"), big.NewInt(9999999999))
ao2, _ := NewAssetObject("ft0", 0, "zz0", big.NewInt(1000), 0, common.Name(""), common.Name("a123456789aeee"), big.NewInt(9999999999), common.Name(""))
ao1.SetAssetId(2)
ast.addNewAssetObject(ao2)
tests := []struct {
Expand Down Expand Up @@ -147,7 +147,7 @@ func TestAsset_addNewAssetObject(t *testing.T) {
ao *AssetObject
}

ao3, _ := NewAssetObject("ft3", 0, "zz3", big.NewInt(1000), 10, common.Name(""), common.Name("a123456789aeee"), big.NewInt(9999999999))
ao3, _ := NewAssetObject("ft3", 0, "zz3", big.NewInt(1000), 10, common.Name(""), common.Name("a123456789aeee"), big.NewInt(9999999999), common.Name(""))
//ao1.SetAssetId(3)

tests := []struct {
Expand Down Expand Up @@ -218,7 +218,7 @@ func TestAsset_GetAssetObjectById(t *testing.T) {
id uint64
}

ao, _ := NewAssetObject("ft", 0, "zz", big.NewInt(1000), 10, common.Name(""), common.Name("a123456789aeee"), big.NewInt(9999999999))
ao, _ := NewAssetObject("ft", 0, "zz", big.NewInt(1000), 10, common.Name(""), common.Name("a123456789aeee"), big.NewInt(9999999999), common.Name(""))
ao.SetAssetId(1)
ast.IssueAssetObject(ao)
tests := []struct {
Expand Down Expand Up @@ -274,7 +274,7 @@ func TestAsset_getAssetCount(t *testing.T) {
t.Errorf("%q. Asset.getAssetCount() = %v, want %v", tt.name, got, tt.want)
}
}
ao, _ := NewAssetObject("ft2", 0, "zz2", big.NewInt(1000), 10, common.Name(""), common.Name("a123456789aeee"), big.NewInt(9999999999))
ao, _ := NewAssetObject("ft2", 0, "zz2", big.NewInt(1000), 10, common.Name(""), common.Name("a123456789aeee"), big.NewInt(9999999999), common.Name(""))
//ao.SetAssetId(1)
ast.IssueAssetObject(ao)
num, err := ast.getAssetCount()
Expand Down Expand Up @@ -330,9 +330,9 @@ func TestAsset_SetAssetObject(t *testing.T) {
ao *AssetObject
}

ao4, _ := NewAssetObject("ft4", 0, "zz4", big.NewInt(1000), 10, common.Name(""), common.Name("a123456789aeee"), big.NewInt(9999999999))
ao4, _ := NewAssetObject("ft4", 0, "zz4", big.NewInt(1000), 10, common.Name(""), common.Name("a123456789aeee"), big.NewInt(9999999999), common.Name(""))
ao4.SetAssetId(0)
ao5, _ := NewAssetObject("ft5", 0, "zz5", big.NewInt(1000), 10, common.Name(""), common.Name("a123456789aeee"), big.NewInt(9999999999))
ao5, _ := NewAssetObject("ft5", 0, "zz5", big.NewInt(1000), 10, common.Name(""), common.Name("a123456789aeee"), big.NewInt(9999999999), common.Name(""))
ao5.SetAssetId(55)
tests := []struct {
name string
Expand Down Expand Up @@ -362,7 +362,7 @@ func TestAsset_IssueAssetObject(t *testing.T) {
type args struct {
ao *AssetObject
}
ao6, _ := NewAssetObject("ft6", 0, "zz6", big.NewInt(1000), 10, common.Name(""), common.Name("a123456789aeee"), big.NewInt(9999999999))
ao6, _ := NewAssetObject("ft6", 0, "zz6", big.NewInt(1000), 10, common.Name(""), common.Name("a123456789aeee"), big.NewInt(9999999999), common.Name(""))
ao6.SetAssetId(11)
tests := []struct {
name string
Expand Down Expand Up @@ -420,7 +420,7 @@ func TestAsset_IssueAsset(t *testing.T) {
a := &Asset{
sdb: tt.fields.sdb,
}
if err := a.IssueAsset(tt.args.assetName, 0, tt.args.symbol, tt.args.amount, tt.args.dec, tt.args.founder, tt.args.owner, big.NewInt(9999999999)); (err != nil) != tt.wantErr {
if err := a.IssueAsset(tt.args.assetName, 0, tt.args.symbol, tt.args.amount, tt.args.dec, tt.args.founder, tt.args.owner, big.NewInt(9999999999), common.Name("")); (err != nil) != tt.wantErr {
t.Errorf("%q. Asset.IssueAsset() error = %v, wantErr %v", tt.name, err, tt.wantErr)
}
}
Expand Down
14 changes: 8 additions & 6 deletions blockchain/genesis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
package blockchain

import (
"bytes"
"encoding/json"
"math/big"
"reflect"
"testing"
Expand All @@ -30,7 +32,7 @@ import (
memdb "github.com/fractalplatform/fractal/utils/fdb/memdb"
)

var defaultgenesisBlockHash = common.HexToHash("0x55d0efa5d279666fe11faa4115b67d84ff92c4fd16f4ed23969c2d94d137160c")
var defaultgenesisBlockHash = common.HexToHash("0x7c65665abff5ddcdeed945b7e373e742f0ceac50040bef2d71e2bbaf8e982d91")

func TestDefaultGenesisBlock(t *testing.T) {
block, _ := DefaultGenesis().ToBlock(nil)
Expand All @@ -41,15 +43,15 @@ func TestDefaultGenesisBlock(t *testing.T) {

func TestSetupGenesis(t *testing.T) {
var (
customghash = common.HexToHash("0x5589268d8d15acf54c7128a45804093fb97c0b635e0ef7209e65642977ea0930")
customghash = common.HexToHash("0x1395829e52af8d75022d363a1645467235f3862fd1dbed71de90fb6cf1f8aeff")
customg = Genesis{
Config: params.DefaultChainconfig.Copy(),
AllocAccounts: DefaultGenesisAccounts(),
AllocAssets: DefaultGenesisAssets(),
AllocCadidates: DefaultGenesisCadidates(),
}
oldcustomg = customg
oldcustomghash = common.HexToHash("b79ee97f522ef624733c30b689cb29366084e7126675312bad0668cb9162dfca")
oldcustomghash = common.HexToHash("18212fd24fb4a27d4a35731d85615a0a050970e6b0443db6011c46e6258c5e66")
)
customg.Config.ChainID = big.NewInt(5)
oldcustomg.Config = customg.Config.Copy()
Expand Down Expand Up @@ -118,9 +120,9 @@ func TestSetupGenesis(t *testing.T) {
t.Errorf("%s: 1 returned error %#v, want %#v", test.name, spew.NewFormatter(err), spew.NewFormatter(test.wantErr))
}

test.wantConfig.SysTokenID = config.SysTokenID
test.wantConfig.SysTokenDecimals = config.SysTokenDecimals
if !reflect.DeepEqual(config, test.wantConfig) {
bts, _ := json.Marshal(config)
wbts, _ := json.Marshal(test.wantConfig)
if bytes.Compare(bts, wbts) != 0 {
t.Errorf("%s:\n 2 returned %v\nwant %v", test.name, config, test.wantConfig)
}

Expand Down
70 changes: 33 additions & 37 deletions params/chainconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,57 +21,53 @@ import (
"math/big"
)

const DefaultPubkeyHex = "047db227d7094ce215c3a0f57e1bcc732551fe351f94249471934567e0f5dc1bf795962b8cccb87a2eb56b29fbe37d614e2f4c3c45b789ae4f1f51f4cb21972ffd"

// ChainConfig is the core config which determines the blockchain settings.
// ChainConfig is stored in the database on a per block basis.
type ChainConfig struct {
BootNodes []string `json:"bootnodes"` // enode URLs of the P2P bootstrap nodes
ChainID *big.Int `json:"chainId"` // chainId identifies the current chain and is used for replay protection
ChainName string `json:"chainName"` // chain name
ChainURL string `json:"chainUrl"` // chain url
AccountNameCfg *NameConfig `json:"accountParams"`
AssetNameCfg *NameConfig `json:"assetParams"`
ChargeCfg *ChargeConfig `json:"chargeParams"`
ForkedCfg *FrokedConfig `json:"upgradeParams"`
DposCfg *DposConfig `json:"dposParams"`
SysName string `json:"systemName"` // system name
AccountName string `json:"accountName"` // system name
DposName string `json:"dposName"` // system name
SysToken string `json:"systemToken"` // system token

SysTokenID uint64 `json:"-"`
SysTokenDecimals uint64 `json:"-"`
BootNodes []string `json:"bootnodes,omitempty"` // enode URLs of the P2P bootstrap nodes
ChainID *big.Int `json:"chainId,omitempty"` // chainId identifies the current chain and is used for replay protection
ChainName string `json:"chainName,omitempty"` // chain name
ChainURL string `json:"chainUrl,omitempty"` // chain url
AccountNameCfg *NameConfig `json:"accountParams,omitempty"`
AssetNameCfg *NameConfig `json:"assetParams,omitempty"`
ChargeCfg *ChargeConfig `json:"chargeParams,omitempty"`
ForkedCfg *FrokedConfig `json:"upgradeParams,omitempty"`
DposCfg *DposConfig `json:"dposParams,omitempty"`
SysName string `json:"systemName,omitempty"` // system name
AccountName string `json:"accountName,omitempty"` // system name
DposName string `json:"dposName,omitempty"` // system name
SysToken string `json:"systemToken,omitempty"` // system token
SysTokenID uint64 `json:"sysTokenID,omitempty"`
SysTokenDecimals uint64 `json:"sysTokenDecimal,omitempty"`
}

type ChargeConfig struct {
AssetRatio uint64 `json:"assetRatio"`
ContractRatio uint64 `json:"contractRatio"`
AssetRatio uint64 `json:"assetRatio,omitempty"`
ContractRatio uint64 `json:"contractRatio,omitempty"`
}

type NameConfig struct {
Level uint64 `json:"level"`
Length uint64 `json:"length"`
SubLength uint64 `json:"subLength"`
Level uint64 `json:"level,omitempty"`
Length uint64 `json:"length,omitempty"`
SubLength uint64 `json:"subLength,omitempty"`
}

type FrokedConfig struct {
ForkBlockNum uint64 `json:"blockCnt"`
Forkpercentage uint64 `json:"upgradeRatio"`
ForkBlockNum uint64 `json:"blockCnt,omitempty"`
Forkpercentage uint64 `json:"upgradeRatio,omitempty"`
}

type DposConfig struct {
MaxURLLen uint64 `json:"maxURLLen"` // url length
UnitStake *big.Int `json:"unitStake"` // state unit
CadidateMinQuantity *big.Int `json:"cadidateMinQuantity"` // min quantity
VoterMinQuantity *big.Int `json:"voterMinQuantity"` // min quantity
ActivatedMinQuantity *big.Int `json:"activatedMinQuantity"` // min active quantity
BlockInterval uint64 `json:"blockInterval"`
BlockFrequency uint64 `json:"blockFrequency"`
CadidateScheduleSize uint64 `json:"cadidateScheduleSize"`
DelayEcho uint64 `json:"delayEcho"`
ExtraBlockReward *big.Int `json:"extraBlockReward"`
BlockReward *big.Int `json:"blockReward"`
MaxURLLen uint64 `json:"maxURLLen,omitempty"` // url length
UnitStake *big.Int `json:"unitStake,omitempty"` // state unit
CadidateMinQuantity *big.Int `json:"cadidateMinQuantity,omitempty"` // min quantity
VoterMinQuantity *big.Int `json:"voterMinQuantity,omitempty"` // min quantity
ActivatedMinQuantity *big.Int `json:"activatedMinQuantity,omitempty"` // min active quantity
BlockInterval uint64 `json:"blockInterval,omitempty"`
BlockFrequency uint64 `json:"blockFrequency,omitempty"`
CadidateScheduleSize uint64 `json:"cadidateScheduleSize,omitempty"`
DelayEcho uint64 `json:"delayEcho,omitempty"`
ExtraBlockReward *big.Int `json:"extraBlockReward,omitempty"`
BlockReward *big.Int `json:"blockReward,omitempty"`
}

var DefaultChainconfig = &ChainConfig{
Expand Down
2 changes: 1 addition & 1 deletion txpool/test_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ func setupTxPool(assetOwner common.Name) (*TxPool, *am.AccountManager) {

statedb, _ := state.New(common.Hash{}, state.NewDatabase(memdb.NewMemDatabase()))
asset := asset.NewAsset(statedb)
asset.IssueAsset("ft", 0, "zz", new(big.Int).SetUint64(params.Fractal), 10, assetOwner, assetOwner, big.NewInt(1000000))
asset.IssueAsset("ft", 0, "zz", new(big.Int).SetUint64(params.Fractal), 10, assetOwner, assetOwner, big.NewInt(1000000), common.Name(""))
blockchain := &testBlockChain{statedb, 1000000, new(event.Feed)}
manager, _ := am.NewAccountManager(statedb)
return New(testTxPoolConfig, params.DefaultChainconfig, blockchain), manager
Expand Down
6 changes: 3 additions & 3 deletions txpool/txpool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func TestStateChangeDuringTransactionPoolReset(t *testing.T) {
)

// issue asset
if err := asset.IssueAsset("ft", 0, "zz", new(big.Int).SetUint64(params.Fractal), 10, common.Name(""), fname, new(big.Int).SetUint64(params.Fractal)); err != nil {
if err := asset.IssueAsset("ft", 0, "zz", new(big.Int).SetUint64(params.Fractal), 10, common.Name(""), fname, new(big.Int).SetUint64(params.Fractal), common.Name("")); err != nil {
t.Fatal(err)
}

Expand Down Expand Up @@ -239,7 +239,7 @@ func TestTransactionChainFork(t *testing.T) {
}
asset := asset.NewAsset(statedb)

asset.IssueAsset("ft", 0, "zz", new(big.Int).SetUint64(params.Fractal), 10, fname, fname, big.NewInt(1000000))
asset.IssueAsset("ft", 0, "zz", new(big.Int).SetUint64(params.Fractal), 10, fname, fname, big.NewInt(1000000), common.Name(""))
newmanager.AddAccountBalanceByID(fname, assetID, big.NewInt(100000000000000))

pool.chain = &testBlockChain{statedb, 1000000, new(event.Feed)}
Expand Down Expand Up @@ -285,7 +285,7 @@ func TestTransactionDoubleNonce(t *testing.T) {
}
asset := asset.NewAsset(statedb)

asset.IssueAsset("ft", 0, "zz", new(big.Int).SetUint64(params.Fractal), 10, fname, fname, big.NewInt(1000000))
asset.IssueAsset("ft", 0, "zz", new(big.Int).SetUint64(params.Fractal), 10, fname, fname, big.NewInt(1000000), common.Name(""))
newmanager.AddAccountBalanceByID(fname, assetID, big.NewInt(100000000000000))

pool.chain = &testBlockChain{statedb, 1000000, new(event.Feed)}
Expand Down

0 comments on commit 88ec5c2

Please sign in to comment.