Commit Graph

20 Commits

Author SHA1 Message Date
David Dashyan 9e99c024d3
Replace headers (#2683)
Signed-off-by: David Dashyan <mail@davie.li>
2020-04-06 11:52:18 +02:00
Troy McConaghy abdd23f5a6 Problem: Source files contain no license info (#2455)
* Problem: Source files contain no license info

Solution: Add comments with SPDX license info to source files

* Python 3 files don't need # -*- coding: utf-8 -*-
2018-08-16 12:31:32 +02:00
Zachary Bowen 3092beb995 Reenable test bigchain api - part 1 (#2415)
* Problem: core.py contains an unused class, `Bigchain`

Solution: Remove core.py. Refactor BigchainDB Class to remove inheritance from Bigchain.

* Fixed flake8 complaint about too many blank lines

* Attempting to fix Sphinx docs. This may result in some redundant commits, as I don't know what I'm doing, and I can't experiment without running the CI...

Sorry in advance!

* Updating from master changed BigchainDB.process_post_response to a private method, so I had to align with that.

* Fixed a couple stale references to bigchaindb.Bigchain in docstrings

* Missed a reference to `Bigchain` in a patch call...

* Problem: Tests in class `TestBigChainAPI` from `tests/db/test_bigchain_api.py` were disabled

Solution: Fixed the tests that still made sense, and deleted the rest.

* Problem: Flake8 style complaints

Solution: Made things prettier

* Problem: Debugging comments were slightly NSFW

Solution: Deleted the debugging comments

* Problem: Stale use of `pytest.mark.genesis` decorator on these tests

Solution: Removed the decorator

* Problem: CriticalDoubleInclusion exception was no longer used anywhere in the code

Solution: Deleted it

* Problem: Unused exception `GenesisBlockAlreadyExistsError`

Solution: Deleted it

* Problem: I removed a test that covered writing to the DB and checking that everything is stored faithfully

Solution: Replaced it and got it working again
2018-08-13 09:54:45 +02:00
codegeschrei 7449b026fa Problem: voting code is not used anymore (#2357)
* Problem: voting code is not used anymore
Solution: remove all voting related code

* Problem: Some voting functionality is still present.

Solution: Remove it. Update some of the related tests.

* Problem: some skipped tests are now running
Solution: remove pytest mark to not run them

* Problem: fastquery is not related to votes
Solution: remove it in another PR
2018-06-28 11:30:13 +02:00
Scott Sadler ddbdf64e33 voting module raises CriticalDuplicateVote if there's a duplicate vote 2017-03-20 17:30:02 +01:00
Scott Sadler e5dd5c665b address vrde's comments, reshuffle some exceptions around 2017-03-07 13:15:31 +01:00
Sylvain Bellemare fdf2a85c97 Add a BigchaindDB base exception class 2017-01-11 07:48:28 -05:00
Sylvain Bellemare 50b0b3cef2 Rebase/feat/586/integrate tx model (#641)
* Adjust imports to bigchaindb_common

* Adjust get_spent function signature

* Adjust block serialization

* Fix BigchainApi Test

* Fix TestTransactionValidation tests

* Fix TestBlockValidation tests

* WIP: TestMultipleInputs

* Adjust tests to tx-model interface changes

- Fix old tests
- Fix tests in TestMultipleInputs class

* Remove fulfillment message tests

* Fix TransactionMalleability tests

* Remove Cryptoconditions tests

* Remove create_transaction

* Remove signing logic

* Remove consensus plugin

* Fix block_creation pipeline

* Fix election pipeline

* Replace some util functions with bdb_common ones

- timestamp ==> gen_timestamp
- serialize.

* Implement Block model

* Simplify function signatures for vote functions

Change parameter interface for the following functions:

- has_previous_vote
- verify_vote_signature
- block_election_status

so that they take a block's id and voters instead of a fake block.

* Integrate Block and Transaction model

* Fix leftover tests and cleanup conftest

* Add bigchaindb-common to install_requires

* Delete transactions after block is written (#609)

* delete transactions after block is written

* cleanup transaction_exists

* check for duplicate transactions

* delete invalid tx from backlog

* test duplicate transaction

* Remove dead code

* Test processes.py

* Test invalid tx in on server

* Fix tests for core.py

* Fix models tests

* Test commands main fn

* Add final coverage to vote pipeline

* Add more tests to voting pipeline

* Remove consensus plugin docs and misc

* Post rebase fixes

* Fix rebase mess

* Remove extra blank line

* Improve docstring

* Remove comment

handled in bigchaindb/cryptoconditions#27;
see https://github.com/bigchaindb/cryptoconditions/issues/27

* Fix block serialization in block creation

* Add signed_ prefix to transfer_tx

* Improve docs

* Add library documentation page on pipelines

* PR feedback for models.py

* Impr. readability of get_last_voted_block

* Use dict comprehension

* Add docker-compose file to build and serve docs

locally for development purposes

* Change private_key for signing_key

* Improve docstrings

* Remove consensus docs

* Document new consensus module

* Create different transactions for the block

* Cleanup variable names in block.py

* Create different transactions for the block

* Cleanup variable names in block.py
2016-09-29 10:29:41 +02:00
David Gasparian 3f53e67c65 Add some exception handling to file_config() config loader 2016-08-07 23:23:40 +04:00
vrde 553148c5e4
Add CyclicBlockchainError exception, fix tests 2016-07-18 13:49:42 +02:00
Ryan Henderson 073dcdaa79 Votes table (#379)
* create votes table and indexes

* initial db call rewrite

* setup votes table in tests

* rewrite election status

* update api tests

* update tests

* bigchaindb set-shards should change 'votes' table too

* Forgot to add change to bigchain.py in last commit

* update test

* move exceptions

* collapse line

* revise test

* remove obsolete test

* remove votelist from blocks

* sharding and replication

* documentation changes

* language change

* more readable assertions

* fix exception

* test exceptions

* remove parameter

* remove loop
2016-07-13 09:40:07 +02:00
Sylvain Bellemare 7bd6d485bc Test Bigchain.get_blocks_status_containing_tx() (#399)
* Test Bigchain.get_blocks_status_containing_tx()

exception case

* Test Bigchaindb.has_previous_vote()

* Add missing blank lines (pep 8)

* Group imports

* Move ImproperVoteError into .exceptions.py

* Simplify logic

* Simplify formatting

* Imrpove the docstrings a bit

* Move GenesisBlockAlreadyExistsError

into .exceptions.py

* Remove unused import

* Add missing blank line

* Remove extra blank line

* Group imports from same module together

* Add test for Bigchain.transaction_exists()
2016-06-28 14:19:22 +02:00
diminator 35f16b5d65
Merge remote-tracking branch 'remotes/origin/master' into feat/128/multiple-input-output 2016-05-02 12:06:54 +02:00
vrde 0d6e74cfc7
Use .wait to check when the database is ready 2016-04-27 17:00:21 +02:00
Rodolphe Marques a4bbffa544 Refactor sign_tx. Fix tests
The implicit condition of create transactions is now handled by
`get_fulfillment_message` instead of `sign_tx`
2016-04-14 16:13:57 +02:00
vrde b3b54e7529 Move common code to util module 2016-02-22 23:46:32 +01:00
vrde fefb365d23 Fix exceptions 2016-02-12 21:07:02 +01:00
vrde 54e1c7e703 Simplify exception name 2016-02-12 19:03:42 +01:00
vrde a0761612ec Move db exception to the right module 2016-02-12 15:02:38 +01:00
Wrigley the Buffalo 841cabe8c6 Add code, have fun! 2016-02-10 19:55:33 +01:00