Skip to content

Commit

Permalink
Merge branch 'release/0.3.8'
Browse files Browse the repository at this point in the history
  • Loading branch information
Roshan Syed committed Mar 5, 2019
2 parents ea46bf3 + 72c55fb commit c7423e0
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 13 deletions.
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ PeerPlays is a **blockchain-based autonomous company** (i.e. a DAC) that
offers gaming and tournaments on a blockchain.

It is based on *Graphene* (tm), a blockchain technology stack (i.e.
software) that allows for fast transactions and ascalable blockchain
software) that allows for fast transactions and a scalable blockchain
solution. In case of PeerPlays, it comes with decentralized gaming
engine and allows setting up and running tournaments of any kind.

Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/howto-build-peerplays.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Downloading the sources

The sources can be downloaded from::

https://github.com/pbsa/peerplays
https://github.com/peerplays-network/peerplays

Dependencies
#############
Expand Down
26 changes: 26 additions & 0 deletions peerplays/peerplays.py
Original file line number Diff line number Diff line change
Expand Up @@ -791,6 +791,32 @@ def disapproveproposal(self, proposal_ids, account=None, approver=None, **kwargs
)
return self.finalizeOp(op, account["name"], "active", **kwargs)


def deleteproposal(
self, proposal_id, account=None, **kwargs
):

from .proposal import Proposal
if not account:
if "default_account" in config:
account = config["default_account"]
if not account:
raise ValueError("You need to provide an account")
account = Account(account, blockchain_instance=self)

proposal = Proposal(proposal_id, blockchain_instance=self)
using_owner_authority = False

op = operations.Proposal_delete(**{
"fee": {"amount": 0, "asset_id": "1.3.0"},
"fee_paying_account": account["id"],
"using_owner_authority": using_owner_authority,
"proposal": proposal_id,
"prefix": self.prefix
})

return self.finalizeOp(op, account["name"], "active", **kwargs)

# -------------------------------------------------------------------------
# Bookie related calls
# -------------------------------------------------------------------------
Expand Down
6 changes: 3 additions & 3 deletions peerplays/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
)


# url = "wss://"
# InRamConfigurationStore.setdefault("node", url)
# SqliteConfigurationStore.setdefault("node", url)
url = "wss://node.peerplays.download"
InRamConfigurationStore.setdefault("node", url)
SqliteConfigurationStore.setdefault("node", url)


def get_default_config_store(*args, **kwargs):
Expand Down
17 changes: 17 additions & 0 deletions peerplaysbase/operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,24 @@ def __init__(self, *args, **kwargs):
)
)


class Proposal_delete(GrapheneObject):
def __init__(self, *args, **kwargs):
if isArgsThisClass(self, args):
self.data = args[0].data
else:
if len(args) == 1 and len(kwargs) == 0:
kwargs = args[0]

super().__init__(OrderedDict([
('fee', Asset(kwargs["fee"])),
('fee_paying_account', ObjectId(kwargs["fee_paying_account"], "account")),
('using_owner_authority', Bool(kwargs["using_owner_authority"])),
('proposal', ObjectId(kwargs["proposal"], "proposal")),
('extenstions', Set([])),
]))


class Sport_create(GrapheneObject):
def __init__(self, *args, **kwargs):
if isArgsThisClass(self, args):
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
ascii = codecs.lookup("ascii")
codecs.register(lambda name, enc=ascii: {True: enc}.get(name == "mbcs"))

VERSION = "0.3.7"
VERSION = "0.3.8"

setup(
name="peerplays",
Expand Down
10 changes: 3 additions & 7 deletions tests/test_witness.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,8 @@


class Testcases(unittest.TestCase):

def test__contains__(self):
witnesses = Witnesses(peerplays_instance=PeerPlays())
"""
self.assertIn("init0", witnesses)
self.assertIn("1.2.7", witnesses)
self.assertIn("1.6.1", witnesses)
"""
self.assertNotIn("faucet", witnesses)
self.assertNotIn("init0", witnesses)
self.assertNotIn("1.2.7", witnesses)
self.assertNotIn("1.6.1", witnesses)

0 comments on commit c7423e0

Please sign in to comment.