1.3、get案例
http://localhost:5000/chain
{
"chain": [
{
"index": 1,
"previous_hash": "1",
"proof": 100,
"timestamp": 1523154040.807251,
"transactions": []
},
{
"index": 2,
"previous_hash": "bcf967686847793897aab280b106ea30017c439aaeec21c9c7bd95472158268f",
"proof": 12383,
"timestamp": 1523154095.569124,
"transactions": [
{
"amount": 1,
"recipient": "b5ae874dc9324a128f4889f89e340112",
"sender": "0"
}
]
}
],
"length": 2
}
pipenv run python blockchain.py
pipenv run python blockchain.py -p 5001
1.4、post案例
{
"nodes":["http://127.0.0.1:5001"]
}
{
"message": "New nodes have been added",
"total_nodes": [
"127.0.0.1:5001"
]
}
1.5、get案例