diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2016-12-02 13:15:30 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2016-12-02 13:16:19 +0000 |
commit | 59443bf9df215e146cd6caa69dc9d4fac50e2523 (patch) | |
tree | e0b42178707c3f4fa2e4b17162f2a9305f3e0f9b /src | |
parent | Merge pull request #1372 (diff) | |
download | monero-59443bf9df215e146cd6caa69dc9d4fac50e2523.tar.xz |
ringct: fix MGs serialization to JSON
Diffstat (limited to 'src')
-rw-r--r-- | src/ringct/rctTypes.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ringct/rctTypes.h b/src/ringct/rctTypes.h index 25f6f9bc9..b1921b71a 100644 --- a/src/ringct/rctTypes.h +++ b/src/ringct/rctTypes.h @@ -281,6 +281,7 @@ namespace rct { // we save the MGs contents directly, because we want it to save its // arrays and matrices without the size prefixes, and the load can't // know what size to expect if it's not in the data + ar.begin_object(); ar.tag("ss"); ar.begin_array(); PREPARE_CUSTOM_VECTOR_SERIALIZATION(mixin + 1, MGs[i].ss); @@ -296,7 +297,7 @@ namespace rct { for (size_t k = 0; k < mg_ss2_elements; ++k) { FIELDS(MGs[i].ss[j][k]) - if (mg_ss2_elements - j > 1) + if (mg_ss2_elements - k > 1) ar.delimit_array(); } ar.end_array(); @@ -306,10 +307,13 @@ namespace rct { } ar.end_array(); + ar.tag("cc"); FIELDS(MGs[i].cc) // MGs[i].II not saved, it can be reconstructed if (mg_elements - i > 1) ar.delimit_array(); + + ar.end_object(); } ar.end_array(); return true; |