Skip to content

Commit 2749ff3

Browse files
committed
rename param, add fee mode
1 parent 186c423 commit 2749ff3

File tree

11 files changed

+449
-264
lines changed

11 files changed

+449
-264
lines changed

packages/block/block.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ func (b *Block) PlaySafe() error {
7676
dbTransaction.Rollback()
7777
if b.GenBlock && len(b.Transactions) == 0 {
7878
if err == transaction.ErrLimitStop {
79-
err = transaction.ErrLimitTime
79+
err = script.ErrVMTimeLimit
8080
}
8181
if inputTx[0].IsSmartContract() {
8282
transaction.BadTxForBan(inputTx[0].TxKeyID())
@@ -222,7 +222,7 @@ func (b *Block) Play(dbTransaction *sqldb.DbTransaction) (batchErr error) {
222222
break
223223
}
224224
if strings.Contains(err.Error(), script.ErrVMTimeLimit.Error()) {
225-
err = transaction.ErrLimitTime
225+
err = script.ErrVMTimeLimit
226226
}
227227
}
228228
if t.IsSmartContract() {

packages/conf/syspar/syspar.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ const (
7171
LocalNodeBanTime = `local_node_ban_time`
7272
// TaxesSize is the value of the taxes
7373
TaxesSize = `taxes_size`
74-
// PriceTxSizeWallet is the size of a user's resource in the database
75-
PriceTxSizeWallet = `price_tx_size_wallet`
74+
// PriceTxSize is the size of a user's resource in the database
75+
PriceTxSize = `price_tx_size`
7676
// PriceCreateRate is new element rate, include table、contract、column、ecosystem、page、menu
7777
PriceCreateRate = `price_create_rate`
7878
// Test equals true or 1 if we have a test blockchain
@@ -356,7 +356,8 @@ func GetFuelRate(ecosystem int64) string {
356356
return fuels[1]
357357
}
358358

359-
func IsFuelRate(ecosystem int64) (string, bool) {
359+
// HasFuelRate is returns fuels exist
360+
func HasFuelRate(ecosystem int64) (string, bool) {
360361
mutex.RLock()
361362
defer mutex.RUnlock()
362363
if ret, ok := fuels[ecosystem]; ok {
@@ -375,8 +376,8 @@ func GetTaxesWallet(ecosystem int64) string {
375376
return wallets[1]
376377
}
377378

378-
// IsTaxesWallet is returns taxes exist
379-
func IsTaxesWallet(ecosystem int64) (string, bool) {
379+
// HasTaxesWallet is returns taxes exist
380+
func HasTaxesWallet(ecosystem int64) (string, bool) {
380381
mutex.RLock()
381382
defer mutex.RUnlock()
382383
if ret, ok := wallets[ecosystem]; ok {

packages/migration/clb/system_parameters_data.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ INSERT INTO "1_system_parameters" ("id","name", "value", "conditions") VALUES
6868
(next_id('1_system_parameters'),'incorrect_blocks_per_day','10','ContractAccess("@1UpdateSysParam")'),
6969
(next_id('1_system_parameters'),'node_ban_time','86400000','ContractAccess("@1UpdateSysParam")'),
7070
(next_id('1_system_parameters'),'node_ban_time_local','1800000','ContractAccess("@1UpdateSysParam")'),
71-
(next_id('1_system_parameters'),'price_tx_size_wallet', '15', 'ContractAccess("@1UpdateSysParam")'),
71+
(next_id('1_system_parameters'),'price_tx_size', '15', 'ContractAccess("@1UpdateSysParam")'),
7272
(next_id('1_system_parameters'),'price_create_rate', '1000000', 'ContractAccess("@1UpdateSysParam")'),
7373
(next_id('1_system_parameters'),'test','false','false'),
7474
(next_id('1_system_parameters'),'price_tx_data', '0', 'ContractAccess("@1UpdateSysParam")'),

packages/migration/first_system_parameters_data.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ INSERT INTO "1_system_parameters" ("id","name", "value", "conditions") VALUES
4242
(next_id('1_system_parameters'),'incorrect_blocks_per_day','10','ContractAccess("@1UpdateSysParam")'),
4343
(next_id('1_system_parameters'),'node_ban_time','86400000','ContractAccess("@1UpdateSysParam")'),
4444
(next_id('1_system_parameters'),'node_ban_time_local','1800000','ContractAccess("@1UpdateSysParam")'),
45-
(next_id('1_system_parameters'),'price_tx_size_wallet', '15', 'ContractAccess("@1UpdateSysParam")'),
45+
(next_id('1_system_parameters'),'price_tx_size', '15', 'ContractAccess("@1UpdateSysParam")'),
4646
(next_id('1_system_parameters'),'price_create_rate', '1000000', 'ContractAccess("@1UpdateSysParam")'),
4747
(next_id('1_system_parameters'),'test','false','false'),
4848
(next_id('1_system_parameters'),'price_tx_data', '10', 'ContractAccess("@1UpdateSysParam")'),

0 commit comments

Comments
 (0)