basho/riak_kv — pull request #1063 by seancribbs (2014-12-16 20:10:07+00:00)
Title: Bugfix for precondition_context test failures.

Previously every riak_dt type simply called riak_dt:to_binary/1 for
serialization, and before 2.0.0 optimizations, was an entire copy of the
datatype. This meant that the precondition context was handled through the
type's to_binary/1 function. The 2.0.0 optimizations use only a VV as the
context, however, so we don't need to serialize via the type's to_binary/1
call, we can call riak_dt_vclock:to_binary/1 directly.

This bug was uncovered by riak_dt#110, which changes how the sets and maps are
manipulated before serialization.