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
564f02aa
Commit
564f02aa
authored
Jan 06, 2015
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed tests
parent
3b8725e0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
chain_manager_test.go
core/chain_manager_test.go
+2
-2
transaction_pool_test.go
core/transaction_pool_test.go
+3
-3
js_types.go
xeth/js_types.go
+2
-2
No files found.
core/chain_manager_test.go
View file @
564f02aa
...
...
@@ -71,7 +71,7 @@ func TestChainInsertions(t *testing.T) {
var
eventMux
event
.
TypeMux
chainMan
:=
NewChainManager
(
&
eventMux
)
txPool
:=
NewTxPool
(
&
eventMux
)
blockMan
:=
NewBlock
Manage
r
(
txPool
,
chainMan
,
&
eventMux
)
blockMan
:=
NewBlock
Processo
r
(
txPool
,
chainMan
,
&
eventMux
)
chainMan
.
SetProcessor
(
blockMan
)
const
max
=
2
...
...
@@ -115,7 +115,7 @@ func TestChainMultipleInsertions(t *testing.T) {
var
eventMux
event
.
TypeMux
chainMan
:=
NewChainManager
(
&
eventMux
)
txPool
:=
NewTxPool
(
&
eventMux
)
blockMan
:=
NewBlock
Manage
r
(
txPool
,
chainMan
,
&
eventMux
)
blockMan
:=
NewBlock
Processo
r
(
txPool
,
chainMan
,
&
eventMux
)
chainMan
.
SetProcessor
(
blockMan
)
done
:=
make
(
chan
bool
,
max
)
for
i
,
chain
:=
range
chains
{
...
...
core/transaction_pool_test.go
View file @
564f02aa
...
...
@@ -55,7 +55,7 @@ func TestAddInvalidTx(t *testing.T) {
func
TestRemoveSet
(
t
*
testing
.
T
)
{
pool
,
_
:=
setup
()
tx1
:=
transaction
()
pool
.
pool
.
Add
(
tx1
)
pool
.
addTx
(
tx1
)
pool
.
RemoveSet
(
types
.
Transactions
{
tx1
})
if
pool
.
Size
()
>
0
{
t
.
Error
(
"expected pool size to be 0"
)
...
...
@@ -65,7 +65,7 @@ func TestRemoveSet(t *testing.T) {
func
TestRemoveInvalid
(
t
*
testing
.
T
)
{
pool
,
key
:=
setup
()
tx1
:=
transaction
()
pool
.
pool
.
Add
(
tx1
)
pool
.
addTx
(
tx1
)
pool
.
RemoveInvalid
(
stateQuery
{})
if
pool
.
Size
()
>
0
{
t
.
Error
(
"expected pool size to be 0"
)
...
...
@@ -73,7 +73,7 @@ func TestRemoveInvalid(t *testing.T) {
tx1
.
SetNonce
(
1
)
tx1
.
SignECDSA
(
key
)
pool
.
pool
.
Add
(
tx1
)
pool
.
addTx
(
tx1
)
pool
.
RemoveInvalid
(
stateQuery
{})
if
pool
.
Size
()
!=
1
{
t
.
Error
(
"expected pool size to be 1, is"
,
pool
.
Size
())
...
...
xeth/js_types.go
View file @
564f02aa
...
...
@@ -169,8 +169,8 @@ func NewJSPeer(peer *p2p.Peer) *JSPeer {
return
&
JSPeer
{
ref
:
peer
,
Ip
:
peer
.
RemoteAddr
()
.
String
(
),
Version
:
peer
.
Identity
()
.
String
(
),
Ip
:
fmt
.
Sprintf
(
"%v"
,
peer
.
RemoteAddr
()
),
Version
:
fmt
.
Sprintf
(
"%v"
,
peer
.
Identity
()
),
Caps
:
fmt
.
Sprintf
(
"%v"
,
caps
),
}
}
...
...
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