Merge branch '0.3.x' into 0.4.x
This commit is contained in:
@@ -130,8 +130,6 @@ err:
|
||||
tmpl->skey = true; \
|
||||
} while(0)
|
||||
|
||||
static void my_flip(void *, size_t);
|
||||
|
||||
static
|
||||
const char *parse_txn(struct blktxn_t *txn, json_t *txnj) {
|
||||
json_t *vv;
|
||||
@@ -148,14 +146,12 @@ const char *parse_txn(struct blktxn_t *txn, json_t *txnj) {
|
||||
if ((vv = json_object_get(txnj, "hash")) && json_is_string(vv))
|
||||
{
|
||||
hexdata = json_string_value(vv);
|
||||
txn->hash_ = malloc(sizeof(*txn->hash_));
|
||||
if (!my_hex2bin(*txn->hash_, hexdata, sizeof(*txn->hash_)))
|
||||
txn->hash = malloc(sizeof(*txn->hash));
|
||||
if (!my_hex2bin(*txn->hash, hexdata, sizeof(*txn->hash)))
|
||||
{
|
||||
free(txn->hash_);
|
||||
txn->hash_ = NULL;
|
||||
free(txn->hash);
|
||||
txn->hash = NULL;
|
||||
}
|
||||
else
|
||||
my_flip(*txn->hash_, sizeof(*txn->hash_));
|
||||
}
|
||||
|
||||
// TODO: dependcount/depends, fee, required, sigops
|
||||
|
||||
@@ -96,7 +96,6 @@ bool blktmpl_get_submitold(blktemplate_t *tmpl) {
|
||||
void _blktxn_free(struct blktxn_t *bt) {
|
||||
free(bt->data);
|
||||
free(bt->hash);
|
||||
free(bt->hash_);
|
||||
free(bt->depends);
|
||||
}
|
||||
#define blktxn_free _blktxn_free
|
||||
|
||||
@@ -23,7 +23,6 @@ typedef uint32_t blknonce_t;
|
||||
struct blktxn_t {
|
||||
unsigned char *data;
|
||||
size_t datasz;
|
||||
// NOTE: The byte order of hash is backward; use hash_ instead
|
||||
txnhash_t *hash;
|
||||
|
||||
signed long dependcount;
|
||||
@@ -32,8 +31,6 @@ struct blktxn_t {
|
||||
uint64_t fee;
|
||||
bool required;
|
||||
int16_t sigops;
|
||||
|
||||
txnhash_t *hash_;
|
||||
};
|
||||
|
||||
// BIP 23: Long Polling
|
||||
|
||||
Reference in New Issue
Block a user