good morning!!!!
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
bor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
open
bor
Commits
3a9d7d31
Commit
3a9d7d31
authored
Jun 12, 2014
by
Jeffrey Wilcke
Browse files
Options
Downloads
Patches
Plain Diff
log changes
parent
1938bfcd
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
ethchain/transaction_pool.go
+6
-0
6 additions, 0 deletions
ethchain/transaction_pool.go
ethpub/pub.go
+0
-2
0 additions, 2 deletions
ethpub/pub.go
ethutil/config.go
+5
-7
5 additions, 7 deletions
ethutil/config.go
peer.go
+2
-1
2 additions, 1 deletion
peer.go
with
13 additions
and
10 deletions
ethchain/transaction_pool.go
+
6
−
0
View file @
3a9d7d31
...
...
@@ -162,6 +162,10 @@ func (pool *TxPool) ValidateTransaction(tx *Transaction) error {
return
errors
.
New
(
"[TXPL] No last block on the block chain"
)
}
if
len
(
tx
.
Recipient
)
!=
20
{
return
fmt
.
Errorf
(
"[TXPL] Invalid recipient. len = %d"
,
len
(
tx
.
Recipient
))
}
// Get the sender
//sender := pool.Ethereum.StateManager().procState.GetAccount(tx.Sender())
sender
:=
pool
.
Ethereum
.
StateManager
()
.
CurrentState
()
.
GetAccount
(
tx
.
Sender
())
...
...
@@ -207,6 +211,8 @@ out:
// Call blocking version.
pool
.
addTransaction
(
tx
)
ethutil
.
Config
.
Log
.
Debugf
(
"%x => %x (%v) %x
\n
"
,
tx
.
Sender
()[
:
4
],
tx
.
Recipient
[
:
4
],
tx
.
Value
,
tx
.
Hash
())
// Notify the subscribers
pool
.
Ethereum
.
Reactor
()
.
Post
(
"newTx:pre"
,
tx
)
}
...
...
This diff is collapsed.
Click to expand it.
ethpub/pub.go
+
0
−
2
View file @
3a9d7d31
...
...
@@ -193,8 +193,6 @@ func (lib *PEthereum) createTx(key, recipient, valueStr, gasStr, gasPriceStr, sc
if
contractCreation
{
ethutil
.
Config
.
Log
.
Infof
(
"Contract addr %x"
,
tx
.
CreationAddress
())
}
else
{
ethutil
.
Config
.
Log
.
Infof
(
"Tx hash %x"
,
tx
.
Hash
())
}
return
NewPReciept
(
contractCreation
,
tx
.
CreationAddress
(),
tx
.
Hash
(),
keyPair
.
Address
()),
nil
...
...
This diff is collapsed.
Click to expand it.
ethutil/config.go
+
5
−
7
View file @
3a9d7d31
...
...
@@ -75,11 +75,11 @@ func ReadConfig(base string, logTypes LoggerType, g *globalconf.GlobalConf, id s
if
Config
==
nil
{
path
:=
ApplicationFolder
(
base
)
Config
=
&
config
{
ExecPath
:
path
,
Debug
:
true
,
Ver
:
"0.5.
0 RC
12"
}
Config
=
&
config
{
ExecPath
:
path
,
Debug
:
true
,
Ver
:
"0.5.12"
}
Config
.
conf
=
g
Config
.
Identifier
=
id
Config
.
Log
=
NewLogger
(
logTypes
,
LogLevelDebug
)
Config
.
SetClientString
(
"
/
Ethereum(G)"
)
Config
.
SetClientString
(
"Ethereum(G)"
)
}
return
Config
...
...
@@ -88,11 +88,9 @@ func ReadConfig(base string, logTypes LoggerType, g *globalconf.GlobalConf, id s
// Set client string
//
func
(
c
*
config
)
SetClientString
(
str
string
)
{
id
:=
runtime
.
GOOS
if
len
(
c
.
Identifier
)
>
0
{
id
=
c
.
Identifier
}
Config
.
ClientString
=
fmt
.
Sprintf
(
"%s nv%s/%s"
,
str
,
c
.
Ver
,
id
)
os
:=
runtime
.
GOOS
cust
:=
c
.
Identifier
Config
.
ClientString
=
fmt
.
Sprintf
(
"%s/v%s/%s/%s/Go"
,
str
,
c
.
Ver
,
cust
,
os
)
}
func
(
c
*
config
)
SetIdentifier
(
id
string
)
{
...
...
This diff is collapsed.
Click to expand it.
peer.go
+
2
−
1
View file @
3a9d7d31
...
...
@@ -153,6 +153,7 @@ func NewPeer(conn net.Conn, ethereum *Ethereum, inbound bool) *Peer {
pubkey
:
pubkey
,
blocksRequested
:
10
,
caps
:
ethereum
.
ServerCaps
(),
version
:
ethutil
.
Config
.
ClientString
,
}
}
...
...
@@ -579,7 +580,7 @@ func (p *Peer) pushHandshake() error {
pubkey
:=
keyRing
.
PublicKey
msg
:=
ethwire
.
NewMessage
(
ethwire
.
MsgHandshakeTy
,
[]
interface
{}{
uint32
(
ProtocolVersion
),
uint32
(
0
),
p
.
version
,
byte
(
p
.
caps
),
p
.
port
,
pubkey
[
1
:
],
uint32
(
ProtocolVersion
),
uint32
(
0
),
[]
byte
(
p
.
version
)
,
byte
(
p
.
caps
),
p
.
port
,
pubkey
[
1
:
],
})
p
.
QueueMessage
(
msg
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment