Remove redundant insert method in serialize

bitcoin #3162