fix
This commit is contained in:
@@ -333,17 +333,16 @@ UniValue getdatafromblock(const UniValue& params, bool fHelp)
|
||||
return chainActive.Height();
|
||||
*/
|
||||
UniValue result(UniValue::VOBJ);
|
||||
UniValue txs(UniValue::VARR);
|
||||
unsigned int i = 0;
|
||||
fprintf(stderr, "%ld\n", block.vtx.size());
|
||||
fprintf(stderr, "number of tx in block: %ld\n", block.vtx.size());
|
||||
BOOST_FOREACH(const CTransaction&tx, block.vtx)
|
||||
{
|
||||
if ( (i == 0) || (i == (block.vtx.size() -1)) )
|
||||
if ( (i != 0) || (i != (block.vtx.size() -1)) )
|
||||
{
|
||||
fprintf(stderr, "tx number: %d \n",i);
|
||||
UniValue objTx(UniValue::VOBJ);
|
||||
voutToJSON(tx, uint256(), objTx);
|
||||
txs.push_back(objTx);
|
||||
result.push_back(objTx);
|
||||
}
|
||||
i = i + 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user