add lock_height to Transaction and TxKernel (#167)

* add lock_height to Transaction and TxKernel, sign msg including both fee and lock_height in kernel
* make the order of the fields in tx and kernel more consistent
* rename to kernel_sig_msg
* add test to cover adding timelocked tx to pool, where tx is invalid based on current height of the blockchain
* add tests for adding timelocked txs to blocks (valid and otherwise)
This commit is contained in:
AntiochP
2017-10-11 14:12:01 -04:00
committed by Ignotus Peverell
parent dc0dbc62be
commit bf7c1fb44f
20 changed files with 432 additions and 167 deletions
+7 -7
View File
@@ -26,23 +26,23 @@ problem_files=()
printf "[pre_commit] rustfmt "
for file in $(git diff --name-only --cached); do
if [ ${file: -3} == ".rs" ]; then
cargo +nightly fmt -- --skip-children --write-mode=diff $file &>/dev/null
if [ $? != 0 ]; then
problem_files+=($file)
result=1
fi
cargo +nightly fmt -- --skip-children --write-mode=diff $file &>/dev/null
if [ $? != 0 ]; then
problem_files+=($file)
result=1
fi
fi
done
if [ $result != 0 ]; then
printf "\033[0;31mfail\033[0m \n"
printf "[pre_commit] the following files need formatting: \n"
printf "[pre_commit] the following files need formatting: \n"
for file in $problem_files; do
printf " cargo +nightly fmt -- $file\n"
done
else
printf "\033[0;32mok\033[0m \n"
printf "\033[0;32mok\033[0m \n"
fi
exit 0