Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
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
张蕾
Geth-Modification
Commits
202362d9
Commit
202362d9
authored
Feb 16, 2015
by
Taylor Gerring
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of github.com:ethereum/go-ethereum into develop
parents
39326748
164de5e2
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
25 deletions
+20
-25
browser.qml
cmd/mist/assets/qml/views/browser.qml
+3
-1
transaction.qml
cmd/mist/assets/qml/views/transaction.qml
+1
-1
wallet.qml
cmd/mist/assets/qml/views/wallet.qml
+1
-1
chain_manager.go
core/chain_manager.go
+5
-21
secp256_test.go
crypto/secp256k1/secp256_test.go
+10
-1
No files found.
cmd/mist/assets/qml/views/browser.qml
View file @
202362d9
...
...
@@ -3,7 +3,7 @@ import QtQuick.Controls 1.0;
import
QtQuick
.
Controls
.
Styles
1.0
import
QtQuick
.
Layouts
1.0
;
import
QtWebEngine
1.0
//
import QtWebEngine.experimental 1.0
import
QtWebEngine
.
experimental
1.0
import
QtQuick
.
Window
2.0
;
Rectangle
{
...
...
@@ -326,6 +326,8 @@ Rectangle {
WebEngineView
{
objectName
:
"webView"
id
:
webview
experimental.settings.javascriptCanAccessClipboard
:
true
experimental.settings.localContentCanAccessRemoteUrls
:
true
anchors
{
left
:
parent
.
left
right
:
parent
.
right
...
...
cmd/mist/assets/qml/views/transaction.qml
View file @
202362d9
...
...
@@ -103,7 +103,7 @@ Rectangle {
ComboBox
{
id
:
valueDenom
currentIndex
:
6
currentIndex
:
5
model
:
denomModel
}
}
...
...
cmd/mist/assets/qml/views/wallet.qml
View file @
202362d9
...
...
@@ -104,7 +104,7 @@ Rectangle {
ComboBox
{
id
:
valueDenom
currentIndex
:
6
currentIndex
:
5
model
:
denomModel
}
...
...
core/chain_manager.go
View file @
202362d9
...
...
@@ -78,11 +78,10 @@ type ChainManager struct {
eventMux
*
event
.
TypeMux
genesisBlock
*
types
.
Block
// Last known total difficulty
mu
sync
.
RWMutex
td
*
big
.
Int
lastBlockNumber
uint64
currentBlock
*
types
.
Block
lastBlockHash
[]
byte
mu
sync
.
RWMutex
td
*
big
.
Int
currentBlock
*
types
.
Block
lastBlockHash
[]
byte
transState
*
state
.
StateDB
}
...
...
@@ -94,13 +93,6 @@ func (self *ChainManager) Td() *big.Int {
return
self
.
td
}
func
(
self
*
ChainManager
)
LastBlockNumber
()
uint64
{
self
.
mu
.
RLock
()
defer
self
.
mu
.
RUnlock
()
return
self
.
lastBlockNumber
}
func
(
self
*
ChainManager
)
LastBlockHash
()
[]
byte
{
self
.
mu
.
RLock
()
defer
self
.
mu
.
RUnlock
()
...
...
@@ -149,7 +141,6 @@ func (bc *ChainManager) setLastBlock() {
rlp
.
Decode
(
bytes
.
NewReader
(
data
),
&
block
)
bc
.
currentBlock
=
&
block
bc
.
lastBlockHash
=
block
.
Hash
()
bc
.
lastBlockNumber
=
block
.
Header
()
.
Number
.
Uint64
()
// Set the last know difficulty (might be 0x0 as initial value, Genesis)
bc
.
td
=
ethutil
.
BigD
(
bc
.
db
.
LastKnownTD
())
...
...
@@ -157,7 +148,7 @@ func (bc *ChainManager) setLastBlock() {
bc
.
Reset
()
}
chainlogger
.
Infof
(
"Last block (#%
d) %x TD=%v
\n
"
,
bc
.
lastBlockNumber
,
bc
.
currentBlock
.
Hash
(),
bc
.
td
)
chainlogger
.
Infof
(
"Last block (#%
v) %x TD=%v
\n
"
,
bc
.
currentBlock
.
Number
()
,
bc
.
currentBlock
.
Hash
(),
bc
.
td
)
}
// Block creation & chain handling
...
...
@@ -234,8 +225,6 @@ func (bc *ChainManager) insert(block *types.Block) {
}
func
(
bc
*
ChainManager
)
write
(
block
*
types
.
Block
)
{
bc
.
writeBlockInfo
(
block
)
encodedBlock
:=
ethutil
.
Encode
(
block
.
RlpDataForStorage
())
bc
.
db
.
Put
(
block
.
Hash
(),
encodedBlock
)
}
...
...
@@ -354,11 +343,6 @@ func (self *ChainManager) CalcTotalDiff(block *types.Block) (*big.Int, error) {
return
td
,
nil
}
// Unexported method for writing extra non-essential block info to the db
func
(
bc
*
ChainManager
)
writeBlockInfo
(
block
*
types
.
Block
)
{
bc
.
lastBlockNumber
++
}
func
(
bc
*
ChainManager
)
Stop
()
{
if
bc
.
CurrentBlock
!=
nil
{
chainlogger
.
Infoln
(
"Stopped"
)
...
...
crypto/secp256k1/secp256_test.go
View file @
202362d9
...
...
@@ -3,9 +3,10 @@ package secp256k1
import
(
"bytes"
"fmt"
"github.com/ethereum/go-ethereum/crypto/randentropy"
"log"
"testing"
"github.com/ethereum/go-ethereum/crypto/randentropy"
)
const
TESTS
=
10000
// how many tests
...
...
@@ -227,3 +228,11 @@ func Test_Secp256_06b(t *testing.T) {
fmt
.
Printf
(
"ERROR: Accepted signature for %v of %v random messages
\n
"
,
fail_count
,
TESTS
)
}
}
func
TestInvalidKey
(
t
*
testing
.
T
)
{
p1
:=
make
([]
byte
,
32
)
err
:=
VerifySeckeyValidity
(
p1
)
if
err
==
nil
{
t
.
Errorf
(
"pvk %x varify sec key should have returned error"
,
p1
)
}
}
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