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
ad048e9f
Commit
ad048e9f
authored
Dec 29, 2013
by
Jeffrey Wilcke
Browse files
Options
Downloads
Patches
Plain Diff
update test
parent
0edcbc69
No related branches found
No related tags found
Loading
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
ethereum.go
+19
-8
19 additions, 8 deletions
ethereum.go
with
19 additions
and
8 deletions
ethereum.go
+
19
−
8
View file @
ad048e9f
...
@@ -2,10 +2,27 @@ package main
...
@@ -2,10 +2,27 @@ package main
import
(
import
(
"fmt"
"fmt"
"os"
"os/signal"
)
)
const
Debug
=
false
const
Debug
=
false
// Register interrupt handlers so we can stop the server
func
RegisterInterupts
(
s
*
Server
)
{
// Buffered chan of one is enough
c
:=
make
(
chan
os
.
Signal
,
1
)
// Notify about interrupts for now
signal
.
Notify
(
c
,
os
.
Interrupt
)
go
func
()
{
for
sig
:=
range
c
{
fmt
.
Println
(
"Shutting down (%v) ...
\n
"
,
sig
)
s
.
Stop
()
}
}()
}
func
main
()
{
func
main
()
{
InitFees
()
InitFees
()
...
@@ -30,17 +47,11 @@ func main() {
...
@@ -30,17 +47,11 @@ func main() {
copyTx
:=
&
Transaction
{}
copyTx
:=
&
Transaction
{}
copyTx
.
UnmarshalRlp
(
txData
)
copyTx
.
UnmarshalRlp
(
txData
)
tx2
:=
NewTransaction
(
"
\x00
"
,
20
,
[]
string
{
"SET 10 6"
,
"LD 10 10"
})
tx2
:=
NewTransaction
(
"
\x00
"
,
20
,
[]
string
{
"SET 10 6"
,
"LD 10 10"
})
blck
:=
New
Block
([]
*
Transaction
{
tx2
,
tx
})
blck
:=
Create
Block
([]
*
Transaction
{
tx2
,
tx
})
bm
.
ProcessBlock
(
blck
)
bm
.
ProcessBlock
(
blck
)
t
:=
blck
.
MarshalRlp
()
fmt
.
Println
(
"GenesisBlock:"
,
GenisisBlock
,
"hashed"
,
GenisisBlock
.
Hash
())
copyBlock
:=
&
Block
{}
copyBlock
.
UnmarshalRlp
(
t
)
fmt
.
Println
(
blck
)
fmt
.
Println
(
copyBlock
)
}
}
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