Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
plugin
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
link33
plugin
Commits
0667b077
Commit
0667b077
authored
Jun 22, 2019
by
liuyuhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
del len judge
parent
19c38a37
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
8 deletions
+2
-8
restore.go
vendor/github.com/33cn/chain33/blockchain/restore.go
+2
-4
go_level_db.go
vendor/github.com/33cn/chain33/common/db/go_level_db.go
+0
-4
No files found.
vendor/github.com/33cn/chain33/blockchain/restore.go
View file @
0667b077
...
@@ -11,6 +11,7 @@ import (
...
@@ -11,6 +11,7 @@ import (
"github.com/33cn/chain33/common/version"
"github.com/33cn/chain33/common/version"
"github.com/33cn/chain33/types"
"github.com/33cn/chain33/types"
dbm
"github.com/33cn/chain33/common/db"
)
)
// Upgrade 升级localDB和storeDB
// Upgrade 升级localDB和storeDB
...
@@ -82,10 +83,7 @@ func (chain *BlockChain) ReExecBlock(startHeight, curHeight int64) {
...
@@ -82,10 +83,7 @@ func (chain *BlockChain) ReExecBlock(startHeight, curHeight int64) {
if
err
!=
nil
{
if
err
!=
nil
{
panic
(
fmt
.
Sprintf
(
"execBlockEx connectBlock readd Txs fail height=%d err=%s, this not allow fail"
,
i
,
err
.
Error
()))
panic
(
fmt
.
Sprintf
(
"execBlockEx connectBlock readd Txs fail height=%d err=%s, this not allow fail"
,
i
,
err
.
Error
()))
}
}
err
=
newbatch
.
Write
()
dbm
.
MustWrite
(
newbatch
)
if
err
!=
nil
{
panic
(
err
)
}
}
}
prevStateHash
=
block
.
StateHash
prevStateHash
=
block
.
StateHash
...
...
vendor/github.com/33cn/chain33/common/db/go_level_db.go
View file @
0667b077
...
@@ -267,10 +267,6 @@ func (mBatch *goLevelDBBatch) Delete(key []byte) {
...
@@ -267,10 +267,6 @@ func (mBatch *goLevelDBBatch) Delete(key []byte) {
}
}
func
(
mBatch
*
goLevelDBBatch
)
Write
()
error
{
func
(
mBatch
*
goLevelDBBatch
)
Write
()
error
{
if
mBatch
.
batch
.
Len
()
==
0
{
llog
.
Info
(
"Write"
,
"len"
,
mBatch
.
batch
.
Len
())
return
nil
}
err
:=
mBatch
.
db
.
db
.
Write
(
mBatch
.
batch
,
mBatch
.
wop
)
err
:=
mBatch
.
db
.
db
.
Write
(
mBatch
.
batch
,
mBatch
.
wop
)
if
err
!=
nil
{
if
err
!=
nil
{
llog
.
Error
(
"Write"
,
"error"
,
err
)
llog
.
Error
(
"Write"
,
"error"
,
err
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment