Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
sakia
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
clients
python
sakia
Commits
aefb76a8
Commit
aefb76a8
authored
11 years ago
by
Caner Candan
Browse files
Options
Downloads
Plain Diff
Merge pull request
#5
from Insoleet/master
Using a keyid when executing transactions
parents
14938db3
a7c8cfb4
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
wrappers/transactions.py
+11
-11
11 additions, 11 deletions
wrappers/transactions.py
with
11 additions
and
11 deletions
wrappers/transactions.py
+
11
−
11
View file @
aefb76a8
...
...
@@ -23,9 +23,9 @@ from . import Wrapper, pks, ucg, hdc, settings
logger
=
logging
.
getLogger
(
"
transactions
"
)
class
Transaction
(
Wrapper
):
def
__init__
(
self
,
type
,
pgp_fingerprint
,
message
=
''
,
peering
=
None
,
server
=
None
,
port
=
None
):
def
__init__
(
self
,
type
,
pgp_fingerprint
,
message
=
''
,
keyid
=
None
,
peering
=
None
,
server
=
None
,
port
=
None
):
super
().
__init__
(
server
,
port
)
self
.
keyid
=
keyid
self
.
pgp_fingerprint
=
pgp_fingerprint
self
.
message
=
message
self
.
type
=
type
...
...
@@ -70,7 +70,7 @@ Comment:
"""
%
context_data
tx
=
tx
.
replace
(
"
\n
"
,
"
\r\n
"
)
txs
=
settings
[
'
gpg
'
].
sign
(
tx
,
detach
=
True
)
txs
=
settings
[
'
gpg
'
].
sign
(
tx
,
keyid
=
self
.
keyid
,
detach
=
True
)
return
self
.
process
(
tx
,
txs
)
...
...
@@ -117,8 +117,8 @@ Comment:
if
not
m
:
raise
ValueError
(
'
bad sum value %d
'
%
__sum
)
class
Transfer
(
Transaction
):
def
__init__
(
self
,
pgp_fingerprint
,
recipient
,
coins
,
message
=
''
,
server
=
None
,
port
=
None
):
super
().
__init__
(
'
TRANSFER
'
,
pgp_fingerprint
,
message
,
server
,
port
)
def
__init__
(
self
,
pgp_fingerprint
,
recipient
,
coins
,
message
=
''
,
keyid
=
None
,
server
=
None
,
port
=
None
):
super
().
__init__
(
'
TRANSFER
'
,
pgp_fingerprint
,
message
,
keyid
,
server
,
port
)
self
.
recipient
=
recipient
self
.
coins
=
coins
...
...
@@ -171,8 +171,8 @@ Coins:
return
tx
class
Issue
(
MonoTransaction
):
def
__init__
(
self
,
pgp_fingerprint
,
amendment
,
coins
,
message
=
''
,
server
=
None
,
port
=
None
):
super
().
__init__
(
'
ISSUANCE
'
,
pgp_fingerprint
,
message
,
server
,
port
)
def
__init__
(
self
,
pgp_fingerprint
,
amendment
,
coins
,
message
=
''
,
keyid
=
None
,
server
=
None
,
port
=
None
):
super
().
__init__
(
'
ISSUANCE
'
,
pgp_fingerprint
,
message
,
keyid
,
server
,
port
)
self
.
amendment
=
amendment
self
.
coins
=
coins
...
...
@@ -188,8 +188,8 @@ class Issue(MonoTransaction):
return
tx
class
Fusion
(
MonoTransaction
):
def
__init__
(
self
,
pgp_fingerprint
,
coins
,
message
=
''
,
server
=
None
,
port
=
None
):
super
().
__init__
(
'
FUSION
'
,
pgp_fingerprint
,
message
,
server
,
port
)
def
__init__
(
self
,
pgp_fingerprint
,
coins
,
message
=
''
,
keyid
=
None
,
server
=
None
,
port
=
None
):
super
().
__init__
(
'
FUSION
'
,
pgp_fingerprint
,
message
,
keyid
,
server
,
port
)
self
.
coins
=
coins
...
...
@@ -205,8 +205,8 @@ class Fusion(MonoTransaction):
return
tx
class
Divide
(
MonoTransaction
):
def
__init__
(
self
,
pgp_fingerprint
,
old_coins
,
new_coins
,
message
=
''
,
server
=
None
,
port
=
None
):
super
().
__init__
(
'
DIVISION
'
,
pgp_fingerprint
,
message
,
server
,
port
)
def
__init__
(
self
,
pgp_fingerprint
,
old_coins
,
new_coins
,
message
=
''
,
keyid
=
None
,
server
=
None
,
port
=
None
):
super
().
__init__
(
'
DIVISION
'
,
pgp_fingerprint
,
message
,
keyid
,
server
,
port
)
self
.
old_coins
=
old_coins
self
.
new_coins
=
new_coins
...
...
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